Here are the steps for converting Vmware windows/linux guest to Xen format. You need qemu-img tool for the conversion.

If you are converting a Vmware Windows virtual machine guest, you have to do an extra step here. If you are converting a Linux guest, follow the conversion steps

Windows VM:

On the vmware guest, do the 4 steps as per http://support.microsoft.com/kb/314082/ . This includes some registry changes and copying few files.

Conversion steps:

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

[root@vm_s7 guest22]# qemu-img info guest22-flat.vmdk
image: fooguest22-flat.vmdk
file format: raw
virtual size: 15G

disk size: 15G

[root@vm_s7
guest22]#

2) 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.

3) How to convert using qemu-img.

[root@vm_s7 guest22]# qemu-img convert guest22-flat.vmdk -O raw /volumes/guest22/guest22.img

4) Create xen config file in /etc/xen/guest22 , with the renamed/converted image file as disk.

disk = [ ‘file:/volumes/guest22/guest22.img,hda,w’ ]

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

This works for me!

References:

http://wiki.xensource.com/xenwiki/VMDKImage
http://ian.blenke.com/vmware/vmdk/xen/hvm/qemu/vmware_to_xen_hvm.html
http://support.microsoft.com/kb/314082/
http://www.funkypenguin.info/tutorial/how-to-convert-a-centos-5-vmware-image-to-xen/

0 Shares:
Leave a Reply

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

You May Also Like