[TUTORIAL] Migrate / Upgrade Windows 10 to Windows 11

Nov 26, 2021
445
222
63
Yesterday I wasted way too much hours migrating some VMs from Windows 10 to Windows 11, since I ran into some obscure problems.
Maybe this helps someone else, because I could not find good information on my specific problems in the forums nor on reddit.

What was "special" about my migration?
mbr2gpt did not work.
From a previous disk expansion, I deleted some recovery partitions.
And for reasons unknown to me, my first system reserved partition was only 50mb in size.
This might have broken the tool mbr2gpt, which is used to convert MBR to GPT, which is a requirement for Windows 11.

Here is what worked for me:

Open cmd as admin.

Enter:
mbr2gpt /validate /disk:0 /allowfullos
If you get no errors, congrats :)
If you get an error, maybe something like I got:
Cannot find OS partition(s) for disk 0
you need to do some extra next steps.
Otherwise you can just issue
mbr2gpt /convert /disk:0 /allowfullos

and shutdown the VM and jump to the "BIOS to OVMF" part.

One possible solution would be to delete every partition expect system reserved and C: Windows
To do that open cmd as admin.
I have not needed it but some say that you should run this command
reagentc /disable
to disable the recovery. But like I said, I don't have recovery partitions for my VMs.

We enter

Code:
diskpart
list disk
select disk
list partition

you should so only two partition. If you have three partitions and the last one is a recovery partition, you might remove it by entering:
Code:

select partition 3

delete partition override
quit

shutdown the VM, take a snapshot, and reboot the VM.

Here is another step that was needed for me to get mbr2gpt working:
In my case, I only have a 50mb system reserved partition and a C: partition that is not marked as active for some reason.
This makes mbr2gpt not recognize the OS. To solve this, we simply enter:

Code:
diskpart
select disk 0
select partition 2
active
exit
and press enter to exit diskpart.

rebuild boot by running
bcdboot C:\Windows /s C: /f BIOS


If we now run
mbr2gpt /validate /disk:0 /allowfullos
there should be no error.

We can now issue:
mbr2gpt /convert /disk:0 /allowfullos

you can ignore the WinRe repair error if you like me don't have a recovery partition.
Shutdown the VM.
Take a snapshot.

Change the BIOS to OVMF
in the PVE settings.
Add an EFI and add a TPM drive.
Change the machine type below to q35 and 8.1 or whatever you like. Just make sure it is above 6 to get support throughout PVE9.
Try to boot the VM. If the VM boots, we should be almost done.
Check with the Windows Health App again what is still missing.
If it is the CPU, shutdown the VM.
Set the CPU to x86-64-v2 or higher.
x86-64-v23 should work for most not very old CPUs.
For very modern CPUs you might even be able to use x86-64-v4.
If your CPU does not support it, you will see an error when you try to boot the VM.

Take a snapshot.
Boot the VM again.
If your Windows does not boot but gives you a bluescreen, try to boot into secure mode or just reboot the VM and try again. In most cases that should work.
Check again with the health app.
You should now be able to upgrade to Windows 11.
 
Last edited:
Wanted to say thanks for this write-up. It was helpful as I dove into in-place upgrades on some Windows 10 VMs.

Just wanted to add, for anyone who may face mbr2gpt issues. In my case, I found why mbr2gpt validation was failing in C:\Windows\setupact.log:
Code:
GetOSDeviceVolume: Cannot get NT path for entry.
FindOSPartitions: Cannot get volume name for the recovery boot entry
Cannot find OS partition(s) for disk 0
The mbr2gpt program seemed to be unable to locate the boot files as it stood. And so I ran bcdboot C:\Windows /s C: /f BIOS to generate boot files inside of the OS partition instead of the System Reserved partition and marked the C: partition as active in Disk Management. I also had to add 1MB of space to the very end of disk0. This can be done through proxmox or gparted.

After this, mbr2gpt /validate /disk:0 /allowfullos and mbr2gpt /convert /disk:0 /allowfullos worked and I was able to continue with setting UEFI BIOS and q35 machine type, adding EFI, TPM, and setting host to x86-64 v3 because my CPU supports it. :)

Thanks again. Hope this helps anyone.
 
Last edited: