Friday, August 7, 2020

Import VM's from Microsoft Hyper-V to Proxmox VE 6.x

Import a vhdx disk image into Proxmox VE.



Tested with:
Proxmox 6.2-4 with zfs
Microsoft HyperV VM disk image *.vhdx 
CIFS share as temporary storage (any shared storage will do)

Instructions
Copy or Export the Microsoft Hyper-V VM Disk image to a shared storage.

Open the Proxmox webinterface.
Create a new VM as close as possible with the hardware specs as the HyperV VM you are importing.
Detach the hard drive. Then delete unused harddrive of this new vm.
remember the VM ID number. In my case it is 100.

In the Proxmox webinterface add the shared storage where you copied or exported the *.vhdx too:
-> Datacenter -> Storage -> Add -> CIFS
        ID                                    TEMP
        Server                             [ip-address of cifs server or nas]
        Username / password     Fill in when neccesary
        Share                              Backup (in my case my share was Backup)

Open Proxmox Shell in webinterface or use Putty.
go to the mounted share:
> cd /mnt/pve/TEMP

import *.vhdx to the newly created vm with VM ID 100:
> qm importdisk [VM ID] [vm-disk].vhdx [local-storage] 
in my case it would be:
> qm importdisk 100 sbs.vhdx local-zfs

wait untill import is finished.
Attach the vm-disk to the vm:
-> 100 -> Hardware -> "double click on unused Disk"
        BUS        IDE is the safest bet to get Windows running if your VM is Windows.
        Click on Add

Boot your VM and if everything went fine your OS should startup without a problem.


No comments: