3.3.4. Managing Virtual Machine Disk Interfaces

By default, any virtual machine is created with a SCSI (Small Computer System Interface) virtual hard disk. If necessary, you can change the interface type of a disk from SCSI to IDE (Integrated Drive Electronics) or VirtIO. For example, to change the interface type of the default disk (hdd0) in the virtual machine MyVM from SCSI to IDE, you can run the following command:

# prlctl set MyVM --device-set hdd0 --iface ide
The VM has been successfully configured

To check that the interface type has been successfully changed, use this command:

# prlctl list -i MyVM | grep hdd0
Boot order: hdd0 cdrom0 fdd0 net0
hdd0 (+) ide:0 image='/vz/vmprivate/d35d28e5-11f7-4b3f-9065-8fef6178bc5b/ \
harddisk.hdd'

The command output shows that now the interface type of the hdd0 disk is IDE.

You can create additional disks for the virtual machine MyVM. For example, to add a new disk of the IDE type to the virtual machine, execute the following command:

# prlctl set MyVM --device-add hdd --iface ide
Creating hdd1 (+) ide:1 image='/vz/vmprivate/d35d28e5-11f7-4b3f-9065-8fef6178bc5b/ \
harddisk1.hdd' 65536Mb
Create the expanding image file, 65536Mb...
The VM has been successfully configured.

You can also create a VirtIO disk. To do this, specify --iface virtio instead of --iface ide in the command above. If you omit the --iface option, a SCSI disk is created by default.

The maximum number of devices (both virtual hard disks and CD/DVD-ROM drives) you can add to a virtual machine is given below:

  • 4 IDE devices
  • 8 SCSI devices

At any time, you can remove the hdd1 disk from the virtual machine MyVM:

# prlctl set MyVM --device-del hdd1
Remove the hdd1 device.
The VM has been successfully configured.

Note

Notes:

  1. Virtual IDE and SCSI disks can be added to or removed from stopped virtual machines only.
  2. You need to initialize a newly added disk before you can start using it. To initialize the disk, use standard means provided by your guest operating system.