3
IDE—IDE disks and CD-ROMs share disk drive names hda, hdb, hdc, and hdd. The VM
randomly assigns a drive name to an IDE disk or CD-ROM.
Virtio—The drive names of virtio disks are vda, vdb, vdc, and vdd. The VM randomly assigns
a drive name to a virtio disk.
A VM supports a maximum of four disks for each bus type. However, a vFW VM supports only one
disk.
When a VM is deployed, the VM automatically assigns a boot order number of 1 to its boot disk. To
change the boot disk, you can perform the following operations:
1. (Optional.) Add a new disk to the VM.
2. Modify the boot order number of the original boot disk.
3. Assign the new boot disk a boot order number that has higher priority than that of the original
boot disk.
For more information about boot order configuration, see "set bootorder vm." To view the disk boot
order, use the
display vmdisklist command.
If you add a disk to a VM on a running VM, you must restart the VM for the configuration to take effect.
If you add a disk to a VM on a stopped VM, the configuration takes effect after you start the VM.
Examples
# Add a disk in QCOW2 format to VM centos7.
<Sysname> system-view
[Sysname] vmm
[Sysname-vmm] create-disk hda0:/centos.qcow size 30 format qcow2
[Sysname-vmm] add disk vm centos7 format qcow2 disk-file hda0:/centos.qcow disk-bus ide
Related commands
create-disk
display vmdisklist
set bootorder vm
add sriov vm
Use add sriov vm to assign an SR-IOV NIC to a VM.
Syntax
In passthrough mode:
add sriov vm vm-name pf pfid
In SR-IOV share mode:
add sriov vm vm-name pf pfid vf vfid [ vlan vlan-id ]
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.
pf pfid: Specifies a physical NIC by its PF ID. The value for the pfid argument is 0.