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.
On the top right, click on From VMWare.
Enter the information of your stand-alone ESXI host, or your vCenter instance.
Check the option for Skip SSL Check if your ESXI host or vCenter instance is using a self-sign certificate. Click Connect when ready.
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.
Select the VMs you want to migrate over.
When you are done with the options, click Import to start the migration.
If successful, on your ESXI or vCenter, you will see some activities from the Task List.
Back in Xen Orchestra, if you click on Home, you will see that the VM is being imported.
Under Tasks, you can see and monitor the process. This will take a while. Go take a coffee break and come back.
When complete, you will be redirected to the VM General information page. That's it!
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.
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
FS0 is generally the EFI directory. Within the EFI directory, you should see a debian folder.
Within the debian folder, you will see a grubx64.efi file.
Run this file, and you should be booted into Debain now.
FS0:\EFI\debian\grubx64.efi
Once you're in Debain, update grub and reboot.
sudo update-grub
sudo grub-install
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