Switching a Windows 10 Template from Legacy Boot to UEFI

Should you possess a DaDesktop host that you plan to use for GPU passthrough or similar hardware acceleration, transforming its boot mode to UEFI is required.

Even though our suggested approach is to employ win10-template-v53 or a more recent version, if you find it more advantageous to carry out the conversion manually, the following procedure outlines the necessary actions:

  1. Turn on the defragmentation service
  2. Generate boot files on the C: volume
  3. Mark the C: partition as Active
  4. Transform the system to UEFI
  5. Adjust the KVM configuration to enable UEFI
  6. Correct the DaDesktop BIOS boot entry
  7. Update the virtio-win drivers
  8. Disable the defrag service
  9. Optional: relocate a partition ahead of the system partition to allow automatic disk expansion
     

1. Activating the Defrag Service

  1. Launch Command Prompt with administrator privileges
  2. Run the following command:
    sc config defragsvc start= demand

2. Making the C: Drive Bootable

  1. Open an elevated command prompt and execute:

    bcdboot.exe c:\windows /s c:

3. Designating C: Disk as Active

  1. Open Disk Management
  2. Right-click the C: partition
  3. Choose "Mark Partition as Active"
     

4. Converting the System to UEFI

  1. In an administrator command prompt, execute:
   mbr2gpt.exe /concver /allowFullOS

 

5. Adjusting KVM Configuration for UEFI Support

  1. Connect via SSH to the ddnode server
  2. Ensure you run subsequent commands with root privileges
  3. Duplicate the OVMF_VARS.fd and qemu.conf files from a UEFI‑capable template, 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. Repairing the DaDesktop BIOS Boot Entry

  1. Stop and then start the virtual machine via the dd4t.dadesktop.com web interface or API
  2. The system will launch into the UEFI Shell
  3. Enter the command: "exit"
  4. Navigate to Boot Management (TODO: FINISH IT)
  5. Press F10 to save changes
  6. Exit the BIOS setup
     

7. Upgrading VirtIO Drivers

Certain templates might contain an old VGA driver that can lead to issues such as the inability to adjust the screen resolution. To resolve this:

  1. From your desktop, download the latest driver package: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.240-1/virtio-win-0.1.240.iso
  2. Install the drivers (TODO: exact file name)
  3. Reboot the system
     

8. Deactivating the Defrag Service

  1. Open Command Prompt as Administrator
  2. Execute:
    sc config defragsvc start= disabled

 

9. Optional: Moving a Partition Ahead of the System Partition for Automatic Disk Resizing

 

  1. Boot the machine into Rescue mode
  2. Use GParted to relocate the partition so that it sits before the system partition
  3. Reboot

10. Setting Up the Idd Drivers

  1. Visit the repository: https://github.com/ge9/IddSampleDriver
  2. Download the latest release from: https://github.com/ge9/IddSampleDriver/releases
  3. Extract on c:\ (otherwise it will not work
  4. Install certificate (as root)
  5. Install the driver (right clikc on .inf file and Install)