This is a guest post by Marko Myllynen.
VMware guests can be converted as Libvirt/QEMU/KVM guests without any need for proprietary VMware tools. There are two ways to do the conversion, use the one appropriate for your environment.
Converting On-Disk VMware Guests to Libvirt Guests
This method is suitable if you have locally the VMDK image file (e.g., the Virtual XP image from local Service Desk).
First, install needed packages:
# yum install qemu-img libguestfs-tools libguestfs-winsupport virsh
[RWMJ notes: libguestfs-winsupport package is only needed on RHEL 6 hosts]
Then, you’ll need to acquire the Windows registry entries described in Microsoft KB article 314082 and adjust them for use with virt-win-reg (that is, replace all
CurrentControlSet instances with
ControlSet001 and make sure the file is properly encoded – see the virt-win-reg(1) manual page for details). The resulting file is also available here. The steps below expect that the entries are available in the file named ./mergeide.reg.
Also, you’ll need to create a domain XML definition file for your new libvirt guest. Please download this file as ./virtual-xp.xml and adjust the following fields as needed:
- memory / currentMemory
- mac address
Note: you *must* set the full path of the virtual image inside the XML (look for the source file definition).
Finally, the actual conversation can be done in three steps:
# qemu-img convert virtual-xp.vmdk virtual-xp.img # virt-win-reg --merge virtual-xp.img mergeide.reg # virsh --connect qemu:///system define virtual-xp.xml
After this you should see your new XP VM in your virt-manager display.
Converting VMware Guests from ESX Server to Libvirt Guests
This method is suitable if your VMware guests are on an ESX server. Please install virt-v2v and see the manual page virt-v2v(1) for details.
Thanks Marko for this excellent tip!