|
VMware to Xen image conversion guide |
|
|
|
Written by geekyB
|
|
Monday, 02 February 2009 07:48 |
This Geekyfacts document has detailed steps about converting a Windows VMware guest image into a Xen guest image. The document expects you to have good knowledge of Vmware and Xen. To convert a Vmware image (vmdk file) to Xen compatible image, the steps listed below has to be followed. There are 3 major activities involved in this- Update Vmware Windows machine's registry entries
- Convert the image to xen format
- Configure the image as xen vm.
Follow the step-by-step instructions mentioned below. Updating Vmware Windows guest's registry:
- Save and backup the registry information of the Vmware Windows virtual machine.
- Copy the registry file from http://geekyfacts.com/public_files/vmware_to_xen_registry.txt to C:\ and rename it as ".reg" file. Instead of copying the registry file from geekyfacts, you can get the complete registry file from Microsoft Knowledge base : http://support.microsoft.com/kb/314082/.
- After downloading this registry file, right click the vmware_to_xen_registry.reg file in Windows Explorer and click Merge to merge the new registry values.
- Extract the Atapi.sys, Intelide.sys, Pciide.sys, and Pciidex.sys files from the %SystemRoot%\Driver Cache\I386\Driver.cab file and copy the files to the %SystemRoot%\System32\Drivers folder. Default location is C:\Windows\system32\drivers. Never overwrite files if they are present already.
- Now we have made changes to the Vmware Windows guest and we are good to shut it down.
Note : Without doing the above mentioned steps, you get "Stop 0x0000007B error" when the Windows image boots up on Xen.
Convert the image to xen format:
- Copy the vmdk file of the updated Windows guest to the xen machine.
- Check the format of vmdk flat file using the below command.
[root@ /virt]# qemu-img info geekyBwin-flat.vmdk image: geekyBwin-flat.vmdk file format: raw virtual size: 20G (21474836480 bytes) disk size: 20G [root@ /virt]#
- If the file format is “raw”, we need not convert the image file using qemu-img convert. Just rename the file to .img format ( ex : geekyBwin.img). This file is good to be booted directly with xen.
- If the file format is not “raw”, use “qemu-img” to convert the image to raw format. The conversion time depends upon the size of your image and your disk speed. Once converted, the image file geekyBwin.img
[root@ /virt]# qemu-img convert geekyBwin-flat.vmdk -O raw geekyBwin.img [root@ /virt]#
Configure the image as xen vm.
- Create xen configuration file for the guest machine, by using the image file as disk. For more detailed Xen information checkout http://geekyfacts.com/index.php?option=com_content&view=article&id=54:xen-tutorial
example : disk = [ 'file:/virt/geekyBwin.img,hda,w' ]
- Boot up the Xen guest and connect to the VNC console of the guest OS.
- Once you boot the guest virtual machine for the first time, the Window operating system will try to install certain drivers and the guest reboots. Done!.
This is the process to migrate a Vmware Windows virtual machine to Xen.
|