This is an old revision of the document!


Convert a VMWare VMDK disk image to Xen HVM

http://linux.cloudibee.com/2008/11/vmware-to-xen-conversion

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

Extra Step for Converting a Vmware Windows VM Guest

You first have to ensure that your image has IDE drivers installed (see Microsoft kb314082)

Check the format of the vmware vmdk file

Halt the vmware VM.

# qemu-img info guest22-flat.vmdk
image: fooguest22-flat.vmdk
file format: raw
virtual size: 15G
disk size: 15G

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.