Skip to content

Migrate Xenserver VM to Vmware

Changing hardware and hyper-visors can be challenging, especially from Xen to vmWare ESXI 6!

What I had to try and was not successful or was time-consuming:

1 Export Xenserver VM to OVF format and try to import in VMWare vSphere – the process of exporting was terribly slow and over 15Gb of data exported would just hang long periods of time before adding some extra megs of data to the exported file. (not suitable for bigger VM’s)

2 Export VM to XVA format with XenCenter, then follow the tutorial found here but for some reason, I did not manage to get the same results on step described in section 2.3, still, this could be my mistake or maybe the poorly described steps in the respective tutorial.

The How to MIGRATE Xenserver vm to Vmware ESXI 6 tutorial.

Below I will describe how we managed to migrate successfully a Linux VM from XenServer to Vmware. the purpose of the following tutorial is to serve others as a sample. Different configurations might require small adjustments to the migration process!

1. ALWAYS Backup – export your VM to XVA via XenCenter as it seems it is the most reliable form of backup for XenServer.

2. Take note of the Disk of the VM you intend to migrate.  WinSCP or any other piece of software that gives you access to XenServer Host Storage, navigate to “/var/run/sr-mount/” browse each folder and find the corresponding VHD.

3. Copy the VHD file out of the Xenserver Storage.

4. Use StarWind V2V  and convert VHD file to VMDK.

5. Create a Linux VM with a similar hardware configuration to the one you intended to migrate.

6. Copy the generated VMDK file on Vmware Datastore in “/vms/volumes/xxx-xxxx-xxx-xxxx/createdVMname/”  xxx-xxxx-xxx-xxxx holds place for the folder where vm was created in (just browse each weird named folder and find your VM storage)

7. Login over ssh in Vmware machine and navigate to “/vms/volumes/xxx-xxxx-xxx-xxxx/createdVMname/”

8. Run this command: “vmkfstools -i your-copied-file-name.vmdk your-new-filename-converted.vmdk -d thin” Replace file names with corresponding names.

9 Go to vSphere and EDIT Settings of the VM, by adding a new Hard Disk, Select “USE AN EXISTING VIRTUAL DISK”, Browse Datastore1 for “your-new-filename-converted.vmdk” (file name is whatever you named the converted file in step 8)

10 Remove any other Hard disks and leave the “your-new-filename-converted.vmdk” imported one ONLY.

11. Power your VM and you should be able to log in to your migrated VM.

12 Setup your network,

Enjoy your migrated VM! 🙂

Additional Resources.

In case you have issues with the above migration, we encourage you to visit and study the below resources: