Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
vms:vmdk [2014/05/15 16:20]
admin created
vms:vmdk [2014/05/16 18:12] (current)
admin [Check the format of the vmware vmdk file]
Line 1: Line 1:
 ====== Convert a VMWare VMDK disk image to Xen HVM  ====== ====== Convert a VMWare VMDK disk image to Xen HVM  ======
-[[http://openwetware.org/wiki/OpenWetWare:Software/Server/Virtual_Machines/Xen/Converting_VMWare_Image_to_Xen]]+[[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 [[http://support.microsoft.com/kb/314082|Microsoft kb314082]]
 + 
 +===== Conversion steps ===== 
 + 
 +==== Check the format of the vmware vmdk file ==== 
 +Halt the vmware VM. 
 +<​code>​ 
 +# qemu-img info FreeNAS-9.2.1.5-RELEASE-x64.vmdk 
 +image: FreeNAS-9.2.1.5-RELEASE-x64.vmdk 
 +file format: vmdk 
 +virtual size: 1.9G (2000027648 bytes) 
 +disk size: 846M 
 +</​code>​ 
 + 
 +If the file format is “raw”, we do not need to convert the image file using qemu-img convert, just rename to file with the .img extension. If it is not “raw”, use “qemu-img” to convert the image to raw format. 
 + 
 +==== Convert Using qemu-img ==== 
 +<​code>​ 
 +# qemu-img convert FreeNAS-9.2.1.5-RELEASE-x64.vmdk -O raw /​var/​opt/​localImg/​FreeNAS-9.2.1.5-RELEASE-x64.img 
 +</​code>​ 
 + 
 +==== Create Xen Config File ==== 
 +Create the Xen config file in **/​etc/​xen/​guest22**,​ with the renamed/​converted image file as disk. 
 +<​code>​ 
 +disk = [ '​file:/​volumes/​guest22/​guest22.img,​hda,​w'​ ] 
 +</​code>​ 
 + 
 +==== Boot up the Xen domU Guest ==== 
 +It should boot up fine.