How to Enable GPU Passthrough in Hyper-V on Windows 10 and Windows 11

GPU passthrough in a virtual machine using Hyper-V allows you to leverage the host's graphics processor to boost graphical performance within the guest operating system. While Hyper-V does not support GPU passthrough as seamlessly as VMware or Proxmox, there are still some ways to enable hardware acceleration for graphics processing tasks. In this guide, we’ll explore how to set up GPU passthrough in Hyper-V on Windows 10 and Windows 11.

Step 1: Verify Your System’s GPU Passthrough Support

Hyper-V on Windows does not fully support GPU passthrough like other hypervisors do. However, on certain versions of Windows 10 and Windows 11, you can try using RemoteFX vGPU or Discrete Device Assignment (DDA) if you’re using Windows Server. Before proceeding, make sure that:

  • You’re running the Pro or Enterprise version of Windows.
  • Your GPU supports virtualization technology (for example, DirectX 11 or higher).
  • The Hyper-V mode is enabled.

Step 2: Configure RemoteFX vGPU (For Windows 10)

In Windows 10, you can use the RemoteFX feature to enable GPU passthrough, though Microsoft has officially removed support for RemoteFX due to security vulnerabilities. If you’re using an older Windows 10 version, follow these steps:

  1. Open Hyper-V Manager and select the virtual machine to which you want to add GPU support.
  2. Go to Settings for the virtual machine and choose Hardware.
  3. Select Add and choose RemoteFX 3D Video Adapter.
  4. Apply the settings and start the virtual machine.

Note: Microsoft no longer recommends using RemoteFX vGPU due to potential security risks, and this option is unavailable in recent builds of Windows 10 and completely removed in Windows 11.

Step 3: Use Discrete Device Assignment (DDA) on Windows Server

For a more complete GPU passthrough solution at the server level, you can use Discrete Device Assignment (DDA), which is available on Windows Server. If you’re running Windows Server 2016 or newer, follow these steps:

  1. Open Device Manager and disable the GPU you want to assign to the virtual machine.
  2. Open PowerShell as an administrator and execute the following command:
    Dismount-VMHostAssignableDevice -LocationPath "device path"

Here, device path refers to the path to your GPU, which you can obtain from Device Manager.

  1. Assign the device to the virtual machine by running the command:
    Add-VMAssignableDevice -LocationPath "device path" -VMName "VM name"

Your GPU should now be available to the virtual machine via DDA.

Step 4: Enable Graphics Hardware Acceleration in Hyper-V

If you only need basic graphics acceleration for tasks like video playback or remote work, you can set up hardware acceleration as follows:

  1. On the host machine, open PowerShell and run the command:
    Set-VMGraphicsAdapter -VMName "VM name" -DynamicMemoryEnabled $true

This command enables dynamic memory allocation, which can improve graphics performance on the virtual machine.