Skip to main content

Migrating VMs from VMWare ESXI to XCP-NG

With the latest Xen Orchestra 5.81 release (https://xen-orchestra.com/blog/xen-orchestra-5-81/), there is now a GUI option for easy VM migration from VMWare ESXI to XCP-NG.

This process is NOT a one way migration; VMs are COPIED to XCP-NG from VMWare ESXI, and the original will remain on VMWare ESXI. If the migration process fails, you can start over again or use alternative migration methods. 

Migrating Using V2V Tool

The V2V Tool is a built-in tool for Xen Orchestra to facilitate the migration from VMWare to XCP-NG. 

Login to your Xen Orchestra WebUI. Click on Import on the side.

Screenshot 2023-04-11 000323.png

On the top right, click on From VMWare.

Screenshot 2023-04-11 000437.png

Enter the information of your stand-alone ESXI host, or your vCenter instance. 

Screenshot 2023-04-11 000449.png

Check the option for Skip SSL Check if your ESXI host or vCenter instance is using a self-sign certificate. Click Connect when ready.

Screenshot 2023-04-11 000525.png

If the credentials are correct, and the connection is successful, you will see the options for choosing which VM to migrate over. 

Click on the drop-down next to VM to see the list of VMs from your ESXI host or vCenter.

Screenshot 2023-04-11 000717.png

Select the VMs you want to migrate over.

Screenshot 2023-04-11 185042.png

When you are done with the options, click Import to start the migration.

Screenshot 2023-04-11 185115.png

If successful, on your ESXI or vCenter, you will see some activities from the Task List.

Screenshot 2023-04-11 185140.png

Back in Xen Orchestra, if you click on Home, you will see that the VM is being imported.

Screenshot 2023-04-11 185300.png

Under Tasks, you can see and monitor the process. This will take a while. Go take a coffee break and come back.

Screenshot 2023-04-11 185507.png

When complete, you will be redirected to the VM General information page. That's it! 

Screenshot 2023-04-11 190342.png

You can now adjust the VM settings accordingly to suit the new XCP-NG environment. 

Troubleshooting Migrated VMs

Occasionally, due to difference in one hypervisor to another, VMs may run into some issues. 

Here are some of the issues I found during my homelab migration from ESXI to XCP-NG, and the solutions I found:

Debian VMs Not UEFI Booting

On my migrated Debian 11 VMs, the initial UEFI boot will put me into the UEFI Shell, and does not seem to be proceed pass this point. Later I found out that this is due to the Debian VM's EFI Grub file needs to be updated to reflect the hypervisor change, since the VM is on a new system. 

Screenshot 2023-04-11 222431.png

We can use the UEFI Shell to manually boot into the Debian VM, then update Grub from there. 

Type map in the UEFI Shell to show all the disks.

map

Screenshot 2023-04-11 222507.png

FS0 is generally the EFI directory. Within the EFI directory, you should see a debian folder.

Screenshot 2023-04-11 222537.png

 Within the debian folder, you will see a grubx64.efi file.

Screenshot 2023-04-11 222559.png

Run this file, and you should be booted into Debain now.

FS0:\EFI\debian\grubx64.efi

Screenshot 2023-04-11 222643.png

Once you're in Debain, update grub and reboot. 

sudo update-grub
sudo grub-install

 Screenshot 2023-04-11 223431.png

The VM should be booting normally now.

Remove VMWare Tools

While it may not cause a problem right away, it is a good idea to remove any existing VMWare Tools or Open-VM-Tools from the system so that it will not conflict with Xen Guest Utilities tool later on. 

sudo apt remove open-vm-tools

Screenshot 2023-04-14 004053.png