How to Convert a Legacy Boot Windows 10 Template to UEFI
If you have a DaDesktop machine and plan to use a GPU or other hardware pass-through, the first thing you’ll need to do is switch it to UEFI boot.
While we still suggest using win10-template-v53 or newer, if you’d rather handle the upgrade yourself, follow the steps below:
- Turn on the defrag service
- Create boot files on the C: drive
- Mark the C: drive as Active
- Convert the system to UEFI mode
- Adjust the KVM config to support UEFI
- Fix the DaDesktop BIOS boot option
- Update the virtio-win drivers
- Disable the defrag service
- Optional: relocate a partition ahead of the system partition to enable automatic disk resizing
1. Enable the Defrag Service
- Open Command Prompt as Administrator
- Run this command:
sc config defragsvc start= demand
2. Make the C: Drive Bootable
-
While still in the admin command prompt, enter:
bcdboot.exe c:\windows /s c:
3. Set the C: Drive as Active
- Launch Disk Management
- Right-click on the C: partition
- Choose Mark Partition as Active
4. Convert the System to UEFI Mode
- In the admin command prompt, run:
mbr2gpt.exe /concver /allowFullOS
5. Adjust the KVM Configuration for UEFI
- SSH into the ddnode
- Make sure you’re acting as root
-
Copy OVMF_VARS.fd and qemu.conf from a template that already supports UEFI boot, for example:
cp /var/lib/kvm/win10-template-v51/OVMF_VARS.fd /var/lib/kvm/yourimagename/
cp /var/lib/kvm/win10-template-v51/qemu.conf /var/lib/kvm/yourimagename/
6. Correct the DaDesktop BIOS Boot Option
- Stop and then start the machine using the dd4t.dadesktop.com GUI or API
- The system will boot into the UEFI Shell
- Type: "exit"
- Go to BootManagement (TODO: provide full details)
- Press F10 to save
- Exit BIOS
7. Update the Virt-io Drivers
Some templates may ship with an outdated VGA driver, which can cause problems like not being able to change the screen resolution. To fix that:
- From your desktop, download the newest version of the drivers: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.240-1/virtio-win-0.1.240.iso
- Install the update (note the exact file name for reference)
- Reboot
8. Disable the Defrag Service
- Open an admin Command Prompt
- Execute:
sc config defragsvc start= disabled
9. Optional: Move a Partition Ahead of the System Partition for Automatic Disk Resizing
- Boot into Rescue mode
- Using GParted, shift a partition so it sits before the system partition
- Reboot
10. Install the Idd Drivers
- Visit https://github.com/ge9/IddSampleDriver
- Download the driver from the releases page: https://github.com/ge9/IddSampleDriver/releases
- Extract the files to C:\ (any other location will prevent it from working)
- Install the certificate as an administrator (run as root)
- Right-click the .inf file and choose Install to set up the driver