Written by James McDonald

February 26, 2024

Just migrated an Azure Linux Ubuntu 22.04 VM to XCP-ng and got it running successfully

Here are my rough steps:

Create a snapshot of the VM in Azure (good idea to shut down the VM when you have a VM that writes data all the time)

Convert the snapshot to a disk (Mine was a Gen 1 VHD) – Actually don’t think this is required and I could have just downloaded the snapshot.

Download the VHD to Windows 11

Using “Hyper-V Manager” in Windows 11 edit the disk do be VHD dynamic

Using uuidgen rename the VHD to [uuid here].vhd e.g. 7b0e267d-f63e-47d8-a6c8-bf8aeac0cf08.vhd

# find the uuidgen utility in linux or wsl 
uuidgen -r

Using FileZilla I copied the 7b0e267d-f63e-47d8-a6c8-bf8aeac0cf08.vhd to the local storage on the XCP-ng host (you can copy it to an NFS or local XCP-ng repo)

Rescan the repository and rename the disk to something descriptive

With Xen Orchestra create a VM with the correct settings (same vCPU’s and RAM as the Azure VM) from a Ubuntu 22.04 template

Remove the & delete the default HDD from the XCP-ng VM

Scan for the VHD uploaded above and attach it to the VM

Boot and hope you see a login prompt in the XO console for the VM


My first attempt failed but I think this was because the Azure VM need a reboot to swap kernels before creating the snapshot



Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…