21
vcpu vcpu-count: Sets the number of vCPUs allocated to the VM. The value range for the
vcpu-count argument depends on the number of CPUs on the device.
memory size: Sets the size of memory allocated to the VM, in KB. The value range for the size
argument depends on the memory size of the device.
vncport vncport: Sets the number of the VNC port, in the range of 0 to 99.
disk disk-file: Specifies the disk file path of the VM. The disk-file argument is a
case-sensitive string of up to 63 characters. The file must be a .qcow2 or .raw file.
format: Specifies the disk format.
raw
: Sets the disk format to RAW.
qcow2: Sets the disk format to QCOW2.
disk-bus: Specifies the disk bus type.
ide: Specifies the 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.
cdrom cdrom-file: Specifies the VM operating system image or driver image file path. The
cdrom-file argument is a case-sensitive string of 1 to 63 characters. The file must be an .iso file.
vnic: Configures the virtual NIC of the VM.
vtap: Specifies the vTap type of NIC for the VM. This type of NIC is virtualized by software.
mac mac-address: Specifies the MAC address of the NIC. The mac-address argument is a
hexadecimal string in the format of xxxx-xxxx-xxxx.
sriov: Specifies the SR-IOV type of NIC for the VM.
pf pfid: Specifies a physical SR-IOV NIC by its PF ID. The value for the pfid argument is 0.
vf vfid: Specifies a virtual SR-IOV NIC by its VF ID. The value range for the vfid argument is 0 to
7.
vlan vlan-id: Specifies the VLAN to which the NIC belongs. The value range for the vlan-id
argument is 1 to 4094.
Usage guidelines
Before you add a disk to a VM, you must use the create-disk command to create the disk.
Examples
# Install a VM based on the specified parameters.
<Sysname> system-view
[Sysname] vmm
[Sysname-vmm] install vm-name centos7 vcpu 1 memory 1048576 vncport 12 disk
hda0:/centos.qcow format qcow2 disk-bus ide cdrom hda0:/centos7.iso vnic vtap mac
0010-1110-5872 vlan 21
Related commands
create-disk
install vm-pkg
Use install vm-pkg to install a VM based on the parameters in the specified .pkg file.