XCP how to import a Physical machine or HyperV

11th July 2025

Find some scratch disk space large enough to hold the disk image, an external hard drive will work.

Download the Disk2VHD utility from Microsoft SysInternals I used the 64bit version

Run the Disk2VHD utility on the PC you want to convert to a VM. You will need to allow Admin & Agree to the ULA.

make a note with the network settings and systeminfo (cpu cores, ram, OS version)

Use the 3 dots button to choose a save location on a NAS or external drive.
Set the options in the top right as shown.

Login to XCP-NG

Choose IMPORT, DISK, select an XCP disk repository destination, ideally NFS as it allows THIN storage (all the free disk space is in 1 pool)
Click the box and choose your .VHD disk file, drag&drop tends to move to a different screen :/

You can check your progress in the tasks menu on the left


Create an empty VM with the same CPU, Ram, OS Template, Name as above, add a 1 mb hard drive
* After creating, you may need to stop the VM as XCP auto-starts it
* Home, VMs, you may need to click the X beside filters to also show powered off VMs
Edit the new VM, Disks tab, Attach Disk, click the drop-down right below (its hard to see) and select the disk imported in the previous step.
click Attach
you can Detach the temporary disk by clicking the red Trashcan Icon beside it, verify it’s size is 2mb.

Start your VM using the Play button in the top right
If your VM fails to boot, stop the VM using the Square in the top right, open the Advanced tab, enable secure boot OR you may need to set the Boot Firmware to bios.