Converting Third-Party Virtual Machines and Disks
In Virtuozzo, you can convert third-party virtual machines and their disks to Virtuozzo virtual machines and disks. Currently, you can convert the following third-party virtual machines and disks:
- Microsoft Hyper-V
- Microsoft Virtual PC
- Virtual Box
- VMware
Converting Virtual Machines
Let us assume that you want to convert a VMware virtual machine that runs the CentOS 5 operating system and has the name centos5 . As the prlctl convert command can work only with virtual machines and disks that are available locally, you first need to copy the virtual machine to the host. Once the virtual machine is on your local server, you can start the conversion. Assuming that you have copied the virtual machine to the /var/parallels directory on the host and the full path to its configuration file is /var/parallels/centos5/config.xml , you can run the following command to perform the conversion:
# prlctl convert /var/parallels/centos5/config.xml
Once the conversion is complete, you can start the virtual machine and manage it in the same way you would manage a native Virtuozzo virtual machine.
Converting Disks
You can also convert third-party virtual disks to Virtuozzo virtual machines and disks using the prl_convert utility. Once you run the utility, it checks the disk and, depending on its type, does one of the following:
- If the disk is a system disk—that is, has an operating system installed,
prl_convert converts it to a Virtuozzo virtual machine. If the utility cannot create a virtual machine for the disk (for example, it fails to detect the operating system on the disk), the disk is converted to a Virtuozzo virtual disk. You can also specify the --allow-no-os option to force the conversion, but in this case you may have problems with starting and using the resulting virtual machine. - If the disk is a data disk,
prl_convert converts it to a Virtuozzo virtual disk.
When converting third-party virtual disks, you need to specify the full path to the original disk file. For example, to convert the system disk of the centos5 virtual machine (that is, the disk where the CentOS 5 operating system is installed) that has the full path of /var/parallels/centos5/centos5.vhd , you can use this command:
# prl_convert /var/parallels/centos5/centos5.vhd
This command creates a ready-to-use Virtuozzo virtual machine with the name centos5 . You can start this virtual machine and manage it in the same way you would manage a native virtual machine. At the same time, if you convert a third-party virtual data disk, you will need first to add the resulting disk to an existing Virtuozzo virtual machine using the prlctl set command.
Notes:
1. When adding a converted virtual disk to an existing Virtuozzo virtual machine or creating a new virtual machine on its basis, make sure that the interface type of the disk is the same as it was in the source virtual machine. For example, if the original disk had the SCSI interface type, ensure that the interface type of the converted disk is also set to SCSI. If you do not configure the disk interface type, it will be set to SATA (this is the default interface type in Virtuozzo virtual machines), which may cause your virtual machine to malfunction.
2. In the current version of Virtuozzo, Hyper-V virtual machines can be converted using the prl_convert utility only. That means that you first need to convert all Hyper-V virtual disks and then add them to an existing virtual machine.
|