2
2. Set the boot order of the new CD-ROM to take precedence over that of the original CD-ROM.
3. (Optional.) Add a new hard disk as the boot disk of the VM.
Alternatively, you can remove the CD-ROM that contains the current operating system image file and
add the CD-ROM that contains the new operating system image file to the VM.
For more information about boot order configuration, see "set bootorder vm." To view the disk boot
order, use the
display vmdisklist command.
Examples
# Add an operating system image to VM centos7.
<Sysname> system-view
[Sysname] vmm
[Sysname-vmm] add cdrom vm centos7 cdrom-file hda0:/centos7.iso
Related commands
display vmdisklist
set bootorder vm
add disk vm
Use add disk vm to add a disk to a VM.
Syntax
add disk vm vm-name format { raw | qcow2 } disk-file path-file disk-bus
{
ide | virtio }
Views
VMM view
Predefined user roles
network-admin
Parameters
vm-name: Specifies a VM by its name. The vm-name argument is a case-sensitive string of 1 to 30
characters.
format: Specifies the disk format.
raw: Specifies the RAW format.
qcow2: Specifies the QCOW2 format.
disk-file path-file: Specifies the disk file path. The path-file argument is a
case-sensitive string of 1 to 63 characters. The file must be a .qcow2 or .raw file.
disk-bus: Specifies the disk bus type.
ide: Specifies the Integrated Device Electronics (IDE) bus type.
virtio: Specifies the virtio bus type. For some operating systems (for example, Windows Server
2008/2012 or FreeBsd), you must install a driver for this bus type.
Usage guidelines
Before you add a disk to a VM, you must use the create-disk command to create the disk.
After you add a disk to a VM, you must partition and format that disk on the guest OS before you can
use it.
A VM supports the following bus types of disks: