How to Convert VMware Virtual Machines to XenServer Virtual Machines

http://support.citrix.com/article/CTX116603

 

Document ID: CTX116603   /   Created On: Jun 17, 2008   /   Updated On: Jun 17, 2008
Average Rating: 4(12 ratings)

View products this document applies to link to products this document applies to

This document describes how to convert a VMware-formatted virtual machine (VM) into a Citrix XenServer virtual machine.
Requirements
You must be comfortable using VMware Workstation and/or Server, a Windows workstation or server to run the XenSource Virtual Disk Migration Utility Version 1.1, and XenServer.
Click here to download the XenSource Virtual Disk Migration Utility Version 1.1
Procedure
1. Identify the VM you want to export.
2. Log on to that VM and uninstall VMware Tools. Refer to the following screen shot:

Note: You will experience issues if these items are not properly removed and/or uninstalled from Add or Remove Programs and from the Taskbar.

3. Delete any snapshots located with the VM.

4. Delete any unnecessary data, drives, or applications you no longer need with that VM.
5. Browse the physical location of the VMware files and locate the virtual machine’s .vmx file.
Documents and SettingschristophDesktopXenImagesvmxfile.JPG
6. Make a note of the path to the virtual machine’s .vmx file.
7. Download XenSource Virtual Disk Migration Utility Version 1.1.
8. Extract the contents to a folder on your Windows computer.
9. Open a command prompt and go to the location of the folder. Change the directory to the location of the v2xva.exe file.
10. Create a folder that will contain the contents of the converted VM.
Note: Citrix recommends creating a unique folder for each VM you intend to export.
11. Type the following command to convert the VMs:
D:\XenSource\V2V Tools\V2XVA_Utility_bin\V2XVA_Utility_bin\v2xva.exe /config:"D:\VMWare\WindowsXP\Windows XP Professional.vmx" /output:"D:\VMwareWindowsXP
ExportedVM"
Below is a screen shot of what the command should look like:
Documents and SettingschristophLocal SettingsTemporary Internet FilesContent.Wordv2v.jpg
12. Allow the export process to finish. This can take around 15 to 30 minutes depending on the size of the virtual machine. A successful export should display the following output:
"Mounting virtual disk images for processing...
Load registry to enable XVA import: The operation completed s
Perform registry update operations....
Unload registry: The operation completed successfully.
Convert VMDK virtual disk image to XVA...
Total disks to convert: 1

Converting Disk 0...

Unmount virtual disk images...
Done."
13. After the export process completes, go to the destination folder and locate the ova.xml file.
Note: Do not change the file structure. The ova.xml file and hda folder must be on the same level.
:Documents and SettingschristophLocal SettingsTemporary Internet FilesContent.Wordv2vexport.jpg
14. Log on to XenCenter.
15. On the menu bar, go to VM > Import.
:Documents and SettingschristophLocal SettingsTemporary Internet FilesContent.Wordimportvmxen.jpg
You will have the option to browse for the ova.xml file or choose either Exported VM or Exported template.
Note: The same file extension (.xva) is used for both the exported VMs and exported templates.
Documents and SettingschristophDesktopXenImagesimportscreenxen.JPG
16. Select XenServer Virtual Appliance Version 1 (ova.xml) from the Files of Type list. You are now able to browse and see the ova.xml file.
Documents and SettingschristophLocal SettingsTemporary Internet FilesContent.Wordimportscreenxen2.jpg
17. Select the XenServer host that you want to deploy the imported VM to.
Documents and SettingschristophDesktopXenImagesimportscreenxen3.JPG
18. Select the storage repository where the virtual disks for the newly imported VM will be stored.
Note: It is important to select the correct storage repository here. You cannot migrate the VM from one storage repository to another after the import process has completed.
Documents and SettingschristophLocal SettingsTemporary Internet FilesContent.Wordimportscreenxen4.jpg
19. Add the network interfaces you want to configure for the new VM.
Documents and SettingschristophLocal SettingsTemporary Internet FilesContent.Wordimportscreenxen5.jpg
20. Click Finish to complete the import process.
:Documents and SettingschristophLocal SettingsTemporary Internet FilesContent.Wordimportscreenxen6.jpg
Allow enough time for the import process to complete. The XenCenter Logs tab displays an estimate of the amount of time that the VM will take to import.
:Documents and SettingschristophLocal SettingsTemporary Internet FilesContent.Wordimportscreenxen8.jpg
The imported VM will have the name “import” at the end of it to identify that it has been imported. You can rename the VM after the import process finishes.
:Documents and SettingschristophLocal SettingsTemporary Internet FilesContent.Wordimportscreenxen7.jpg
How to Import a VM through the Command Line Interface (CLI):
1. Copy all the files needed to a mounted share accessible by your XenServer host.
2. Run the xe vm-import command:
#xe vm-import filename=<path and name of ova.xml file> sr-uuid=<UUID of SR to install imported VM to>
Example command: # xe vm-import filename=/stuff/shares/VMWare_WinXP_Export/ova.xml sr-uuid=da31c9d2-88ea-35f6-8c48-924db6c39817
More Information
XenSource Virtual Disk Migration Utility Version 1.1 README
Virtual Disk Migration Utility binaries
Virtual Disk Migration Utility source code

This document applies to: