Hi!
I found lots of infos how to use a Windows 10 generation 2 Hyper-V VM in Proxmox. But none worked for me completly.
So I decided to write down what worked for me. Unfortunately I can only attach 10 pictures here, so I can't show all the pictures.
What you need:
1) Windows 10 Installation ISO - get it here: https://www.microsoft.com/en-us/software-download/windows10ISO
2) Virtio-win ISO - get it here: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso
Common problems:
1) Generation 2 virtual machines are booting via UEFI. So you can't use SeaBIOS in Proxmox but you must use OVMF and you need to add a EFI Disk. Further you might have to tweak the boot process in the UEFI Bios.
2) Virtio-Driver do not load by default even if installed earlier. Workaround: Inject the Virtio-SCSI driver before booting and then install the virtio-win CD.
You find some information here: https://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE
Step 1 on the Hyper-V Server:
a) Shutdown the windows VM. Right-click and export the vm.
b) We only need the disk file with the ending vhdx or vhd
c) Transfer this file to your proxmox server
Step 2 on Proxmox:
a) Create a new virtual machine
Next create the VM but do not start it. (If you had to create a harddisk delete it now).
Add a second CD/DVD:
an use the virtio-win.iso
Now it is time to import the windows_10 vhdx:
This need to be done in the terminal:
Now we can see the disk in the proxmox gui and we can attach it by double-clicking it:
Attach it to SCSI on the VirtIO SCSI. Set the cache type to what you like, maybe see documentation for pros and cons.
Now my machine looks like this:
Make sure that the boot order is correct. It should first try to boot from the CD/DVD drives and then from our imported harddisk on scsi1.
Inject the virtio-driver to your windows installation:
Now it is time to boot the machine up. Try not to miss the "Press an key to boot from CD" to boot from the windows iso.
Now you will get the Windows Setup windows
Choose your language settings --> next --> Repair your computer --> Troubleshoot --> Command prompt
Now you get a windows command prompt:
I found lots of infos how to use a Windows 10 generation 2 Hyper-V VM in Proxmox. But none worked for me completly.
So I decided to write down what worked for me. Unfortunately I can only attach 10 pictures here, so I can't show all the pictures.
What you need:
1) Windows 10 Installation ISO - get it here: https://www.microsoft.com/en-us/software-download/windows10ISO
2) Virtio-win ISO - get it here: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso
Common problems:
1) Generation 2 virtual machines are booting via UEFI. So you can't use SeaBIOS in Proxmox but you must use OVMF and you need to add a EFI Disk. Further you might have to tweak the boot process in the UEFI Bios.
2) Virtio-Driver do not load by default even if installed earlier. Workaround: Inject the Virtio-SCSI driver before booting and then install the virtio-win CD.
You find some information here: https://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE
Step 1 on the Hyper-V Server:
a) Shutdown the windows VM. Right-click and export the vm.
b) We only need the disk file with the ending vhdx or vhd
c) Transfer this file to your proxmox server
Step 2 on Proxmox:
a) Create a new virtual machine
- In the general tab: no special settings needed
- In the OS tab: Use a CD/DVD and attach the Windows 10 iso. Guest OS: set to Microsoft Windows an Version to 10.
- In the System tab: Choose OVMF (UEFI) as BIOS and add a EFI Disk. Set the SCSI controller to VirtIO SCSI and check Qemu Agent
- In the Disks tab: in proxmox 7.1. delete the preconfigures harddisk and create it without harddisk. In earlier versions create a harddisk - but please delete it right after creating the vm! We use our import vhdx/vhd instead!
- For the CPU and memory tab: try to match your hyper-v vm as closely as possible.
- In the Network Tab: use VirtIO as your model
Next create the VM but do not start it. (If you had to create a harddisk delete it now).
Add a second CD/DVD:
an use the virtio-win.iso
Now it is time to import the windows_10 vhdx:
This need to be done in the terminal:
Code:
We can use this command:
qm importdisk <vmid> <source> <storage> [OPTIONS]
For me it looks like this:
root@pm2:~# qm importdisk 200 ./Windows\ 10\ Pro.vhdx local-zfs
importing disk './Windows 10 Pro.vhdx' to VM 200 ...
....
....
Successfully imported disk as 'unused0:local-zfs:vm-200-disk-1'
Now we can see the disk in the proxmox gui and we can attach it by double-clicking it:
Attach it to SCSI on the VirtIO SCSI. Set the cache type to what you like, maybe see documentation for pros and cons.
Now my machine looks like this:
Make sure that the boot order is correct. It should first try to boot from the CD/DVD drives and then from our imported harddisk on scsi1.
Inject the virtio-driver to your windows installation:
Now it is time to boot the machine up. Try not to miss the "Press an key to boot from CD" to boot from the windows iso.
Now you will get the Windows Setup windows
Choose your language settings --> next --> Repair your computer --> Troubleshoot --> Command prompt
Now you get a windows command prompt:
- First step: show all drives:
wmic logicaldisk get deviceid, volumename, description
- This will show you all drives - but it will not show the imported windows harddisk as the virtio scsi driver is not loaded
- see which drive contains the virtio-win iso, here it is drive D:
- Load the virtio-scsi driver with:
drvload d:\vioscsi\w10\amd64\vioscsi.inf
- Show all drives again:
wmic logicaldisk get deviceid, volumename, description
- now drive c: with the windows installation should be found. If this is the case, then we can inject the driver into this windows installation dism /image:c:\ /add-driver /driver:d:\vioscsi\w10\amd64\vioscsi.inf
We have injected the virtio scsi driver so we can exit this shell, shutdown the pc and reboot.
Now see if windows boots. If it won't boot see the next post down below to see how to fix the UEFI Bios boot process.
It you can boot windows the continue:
In Windows 10: Install all virtio-driver from the virtio-win cd that is loaded in windows and install the qemu-guest-agent from guest-agent folder
See the windows device-manager if all drivers are installed:
Et volia. You have migrated your windows 10 to proxmox. Reboot to see if everything works!
Troubleshooting the UEFI boot process if windows does not boot:- Remove the CD/DVDs -> Hardware -> Double-click the CD/DVD Drive and check "Do not use any media" for both CD/DVD drives (or remove them completely)
- Start the VM in the console view - right after starting it press ESC a few time to enter the UEFI Bios
- Go to Boot Maintainance Manager --> Boot From File --> Now choose the correct harddisk (if you have removed the isos from the CD/DVD you should only have one entry) --> Choose this one --> Now you might have to experiment a bit --> for me this works: <EFI> --> <Boot> --> bootx64.efi --> choose this entry and see if windows boots now. If it does not boot see in you can find another efi file which works
- If you found the correct file, now make it persistent. Reboot --> ESC to get into the UEFI Bios
- Boot Maintenance Manager --> Boot Options --> Add Boot Option -> Choose the efi-file that worked -> input a description like "Windows10" --> Commit changes and exit --> Change Boot Order --> Sort the boot order that you new entry is on top of the list and press F10 to save it. Now leave the Bios an reboot to see if it works
Good luck and happy converting to proxmox!- First step: show all drives:
Last edited: