Here's our custom directions for moving a VM from Hyper-V to Proxmox.
Exporting from Hyper-V
This part is dead-nuts simple.
- Enter a Remote Desktop Session on the host that contains the VM.
Using an RDP session makes setting an export location a bit easier. - Launch Hyper-V manager.
- Locate the VM in the center pane.
- Right Click on it and select Export.
- Specify a destination.
It helps if this is either also an NFS share or can be easily copied to an NFS share - Wait (it's the hardest part https://www.youtube.com/watch?v=uMyCa35_mOg)
- If the destination you selected is not an NFS share mounted to ProxMox, go ahead and copy it to a share now, using the method of your choice.
- Assuming it Succeeds, you've now successfully exported a VM from Hyper-V, go grab a snack or sweet treat, you deserve it!
Importing to ProxMox
This part's also not really that difficult, just requires some command line bits
- We're going to start by creating a VM without a hard drive
- Log in to ProxMox.
- Select Create VM from the menu at the very tippy top of the web page.
- On the General tab:
- Select the Node.
- Choose your resource pool.
- Specify the ID that you want to use.
- Set the Name of the VM, please follow the server naming convention when doing so.
- Click Next to bring you to the OS settings.
- Select the Do not use any media radio button, then select Next.
- On the System tab, the defaults will often work, but you might need to add a TPM for a windows machine, especially if you're going to be using a desktop OS.
- Once you've chosen your System settings, click Next.
- On the Disks tab.
- Select the trash can icon next to the default disk to delete it.
- Select Next to go to CPU settings
- Set your Sockets and Cores here, it's best to match the settings that existed in Hyper-V.
You can also set the type although we haven't tested anything beyond the default x86-64-v2-AES.
- Set your Sockets and Cores here, it's best to match the settings that existed in Hyper-V.
- Select Next so we can set the memory.
- Again, it's best to match the memory used in Hyper-V, ensure you're using a multiple of 1024 though because other wise we end up with VMs with 11.72GiB of RAM
- Click Next take you to the Networking tab
- Bridge: tells you which network you'll be on, please use the one that will put you in the 10.0.10.0/24 address space
- Model: If you're migrating a windows box, you need to ensure that the Red Hat drivers are installed if you want to use the VirtIO one, others will be discussed later
- VLAN Tag, set this to 110 if you're going to be in the 10.0.10.0 space
- Select Next to be taken to the Confirmationtab.
- Review all your settings and ensure the Start after created box IS NOT CHECKED.
- Click Finish, then get up, have a biiiig stretch, and go for a walk. Please come back though, we're not done yet.
- Now for the scary part, importing the hyper-v export disk in to proxmox and attaching it to the newly created VM
- From the ProxMox web UI, open a Shell session on the node that was selected in Creation step 1.3.1
- Verify that your .vhdx file from Export step exists where you can reach it.
ls -lah /mnt/pve/proxmox-vms/Import-Export/Device42-RemoteCollector
- Use the qm command to import the vhdx file to proxmox
qm disk import <ID> <Path to the VHDX file from above> <Path to where you want the storage to end up>
- Example:
qm disk import 117 /mnt/pve/proxmox-vms/Import-Export/Device42-RemoteCollector/Device42-rc-18.03.00.vhdx pxmx02-local
- The above command imports the vhdx disk, attaches it to VM 117 and moves it pxmx02-local
- Now, we wait, again. (still the hardest part)
- In the web UI, select the VM from the left pane.
- From there, select the Hardware section
- Select the Unused Disk from the list and click Edit.
- Verify the disk settings are correct, then click Add.
- You will need to ensure the drive type is the same. Hyper-V defaults to IDE, Proxmox defaults to SCSI. If you do not get these right, it will not boot.
- In the Options section
- Update the Boot Order, checking the box for the new disk. and adjust the boot order if desired.
- Now you can power on the VM and it all should work!