Convert Windows 10 virtual from MBR and BIOS boot to GPT and UEFI

I had an old Windows 10 virtual I use to test out stuff and it's been around from the times when you could upgrade from Windows 8 for free. That again was an upgraded Windows 7, so you get the picture, UEFI in Linux KVM didn't work when this thing was installed. Nowdays it works and I want to upgrade this virtual to boot from UEFI instead. Windows 10 comes with an utility to do the conversion on an existing installation, so no need to reinstall. However, it'd be a very good idea to take a snapshot of the virtual before doing this!

First Windows needs to be rebooted into rescue mode. Settings -> Update & Security -> Recover -> Advanced startup.

Next I selected Troubleshoot -> Advanced Options -> Command prompt. This made Windows reboot, ask me to log in and then let me into recovery environment command line. The utility is in \windows\system32 directory, which should be where we land when the recovery console starts. Converting takes two commands:

mbr2gpt /validate

mbr2gpt /convert

Once finished, the command line window can be closed and virtual powered off. Afterwards the boot firmware can be configured from BIOS to UEFI and secure boot can be turned on.

No comments:

Post a Comment