Convert VMware VM to KVM/Xen/QEMU on Centos 6


I found these steps at I found them pretty helpful, but I have modified them a little to show what I had to do.

If this is a Windows VM, you must first modify the storage controller to make it more “universal” and allow the controller change. You can follow the directions in the Windows Support KB Article ( or you can do what I did. Go to Device Manager and double-click the storage driver (ide controller, raid controller, scsi…whatever your machine has) and choose update driver. In the list of updated drivers, choose from a list and choose the Microsoft Standard Controller. Click OK, and then shutdown your computer and follow the directions below.

Conversion steps:

1) Delete any old Snapshots. This will get rid of the duplicate files and merge the changes back into one vmdk file.

2) Halt the vmware VM . Check the format of the vmware vmdk file

[root@mtdhost]# qemu-img info mtdhost-xp.vmdk
image: mtdhost-xp.vmdk
file format: raw
virtual size: 15G
disk size: 15G

3) If the file format is “raw”, we need not convert the image file using qemu-img convert, just rename to .img file. If it is not “raw”, use “qemu-img” to convert the image to raw format. Otherwise skip step 4.

4) How to convert using qemu-img.

[root@mtdhost]# qemu-img convert mtdhost-xp.vmdk -O raw /VM/mtdhost-xp.img

5) Create xen config file in /etc/xen/mtdhost-xp (or use the virt-manager utility and choose the newly converted file as the harddrive image), with the renamed/converted image file as disk.

disk = [ ‘file:/VM/mtdhost-xp.img,hda,w’ ]

6) Boot up the xen domU guest. It should boot up fine.



Add a Comment

Your email address will not be published. Required fields are marked *