Migrating a Hyper-V VM to Proxmox (without 3rd party products)
Overview
This guide will show you how to migrate a Hyper-V VM to a Proxmox host without using 3rd party products like Starwinds V2V.
Procedure
1. Stop the Hyper-V VM
Stop your Hyper-V VM that you would like to migrate, either through the Hyper-V management UI or PowerShell:
# Get the VMs on the hostPS C:\> Get-VM
Name State CPUUsage(%) MemoryAssigned(M) Uptime Status Version---- ----- ----------- ----------------- ------ ------ -------vm-needs-migration Running 3 4096 21.15:00:19.2640000 Operating normally 10.0
# Stop the VM in questionPS C:\> Stop-VM -Name "vm-needs-migration"
# Confirm VM has not been auto-restartedPS C:\> Get-VM
Name State CPUUsage(%) MemoryAssigned(M) Uptime Status Version---- ----- ----------- ----------------- ------ ------ -------vm-needs-migration Off 0 0 00:00:00 Operating normally 10.02. Locate the VM’s attached disks
Find the path of the VM’s attached disks:
# Find the VHDX path of the VM diskPS C:\> Get-VMHardDiskDrive -VMName "vm-needs-migration" | select Path
Path----V:\Hyper-V\Virtual Hard Disks\vm-needs-migration.vhdx3. Move the VM disk to the Proxmox host
# Move the VM disk to ProxmoxPS C:\> scp "V:\Hyper-V\Virtual Hard Disks\vm-needs-migration.vhdx" root@proxmox:/tmp/root@proxmox's password:vm-needs-migration.vhdx 100% 8292MB 73.5MB/s 01:524. Create the VM in Proxmox and import the VHDX
# Verify VM disk is presentroot@proxmox:~# ls /tmp...vm-needs-migration.vhdx...
# Import disk to VM# Replace <your vm id> with the ID of the VM that is taking the disk# Replace <your storage> with your storage poolroot@proxmox:~# qm importdisk <your vm id> /tmp/vm-needs-migration.vhdx <your storage>importing disk '/tmp/vm-needs-migration.vhdx' to VM 132 ...transferred 0.0 B of 60.0 GiB (0.00%)...transferred 60.0 GiB of 60.0 GiB (100.00%)unused0: successfully imported disk 'vm_storage_pool:vm-132-disk-1'Then, in the Proxmox UI:
- Add the unused disk to your VM (Hardware > Unused Disk <number>)
- Enable the disk for booting (if it’s a bootable disk) in the VM options (Options > Boot Order)
- Boot the VM
5. Troubleshooting
If the VM does not boot because it was a Generation 2 Hyper-V VM, the EFI boot variables did not come over with the disk. They can be re-added through the VM’s UEFI BIOS settings.

To recover the boot entry:
- Press any key to enter the UEFI BIOS
- Navigate to Boot Maintenance Manager
- Navigate to Boot Options
- Navigate to Add Boot Option
- Navigate to your boot disk
- Navigate to
<EFI> - Choose your distribution’s folder. Options vary by bootloader and operating system - for this example we’ll assume Debian. Navigate to
<debian>. - Select
shimx64.efiif it exists (otherwisegrubx64.efi) - Give it a name -
Debianis fine - Select Commit Changes and Exit
- Select Change Boot Order
- Press
Enteron the row showingDebianand<UEFI QEMU HARDDISK>, select theDebianoption, press+to move it to the top, then pressEnter - Select Commit Changes and Exit
- Press
Esc - Press
F10to save, thenYto confirm - Reset the VM, or return to the previous menu and select Reset
You should now reach the GRUB bootloader and be able to boot into Debian.