Introduction to GPU Passthrough in Hyper-V on Windows Server 2022
GPU passthrough in Hyper-V is accomplished through a feature called Discrete Device Assignment (DDA). DDA allows a physical PCIe device — including a GPU — to be directly assigned to a virtual machine, bypassing the hypervisor’s device emulation layer entirely. The VM gains exclusive, near-native access to the GPU hardware, which makes DDA suitable for compute-intensive workloads such as machine learning training, scientific simulation, and hardware-accelerated rendering.
Windows Server 2022 supports DDA for qualifying PCIe devices. However, it is important to note upfront that RemoteFX vGPU — a previous Hyper-V feature that allowed shared GPU access across multiple VMs for Remote Desktop — was fully removed in Windows Server 2022. Microsoft deprecated RemoteFX due to security vulnerabilities, and it is no longer available. GPU Partitioning (GPU-P), the modern replacement for shared GPU scenarios, was introduced in Windows Server 2022 and is discussed later in this article. DDA, by contrast, remains the standard for exclusive GPU assignment.
Prerequisites for Discrete Device Assignment
Before attempting to configure DDA, your environment must meet several hardware and software requirements. Failure to meet these prerequisites is the most common cause of DDA setup failures.
The host server must have a CPU that supports Second Level Address Translation (SLAT). On Intel CPUs this is called Extended Page Tables (EPT); on AMD CPUs it is called Rapid Virtualisation Indexing (RVI). Every modern Xeon or EPYC processor supports SLAT, but you should confirm it is enabled in UEFI firmware.
The server motherboard and UEFI must support PCIe ACS (Access Control Services) or an equivalent mechanism that allows the IOMMU to isolate individual PCIe devices into their own interrupt remapping domains. Without ACS, devices that share an IOMMU group cannot be individually assigned. You can check ACS support through your server vendor’s documentation or by inspecting IOMMU group membership on the host.
The GPU itself must be compatible with DDA. Professional and data-centre GPUs — such as the NVIDIA A100, A40, RTX A6000, and older Quadro/Tesla series — are typically supported. Consumer gaming GPUs (GeForce) are often not officially supported and may have driver restrictions that prevent operation inside a VM, though some configurations do function. AMD Instinct and Radeon Pro GPUs are similarly variable. Always consult the GPU vendor’s virtualisation compatibility matrix.
The Hyper-V role must be installed on Windows Server 2022. The host OS must be 64-bit. The VM must be Generation 2. DDA is not supported with Generation 1 virtual machines.
Checking GPU DDA Compatibility on the Host
Microsoft provides a script to assess whether a given device is suitable for DDA. Download and run the SurveyDDA.ps1 script from the Microsoft GitHub repository, or use the built-in cmdlets to inspect device properties manually.
To list all PCIe devices and their DDA suitability, run the following in an elevated PowerShell session on the host:
$devices = Get-PnpDevice -PresentOnly | Where-Object {$_.Class -eq "Display"}
foreach ($dev in $devices) {
$loc = Get-PnpDeviceProperty -InstanceId $dev.InstanceId -KeyName DEVPKEY_Device_LocationPaths
Write-Host "$($dev.FriendlyName) — $($loc.Data)"
}
Note the location path of the GPU you wish to assign. It will look similar to PCIROOT(0)#PCI(0100)#PCI(0000). You will need this path when dismounting the device from the host.
You can also use the SurveyDDA.ps1 script which performs a more thorough check including ACS capability, interrupt remapping, and whether the device is already in use:
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/MicrosoftDocs/Virtualization-Documentation/main/hyperv-tools/DiscreteDeviceAssignment/SurveyDDA.ps1" -OutFile C:ToolsSurveyDDA.ps1
Set-ExecutionPolicy Bypass -Scope Process
C:ToolsSurveyDDA.ps1
The output will list each PCIe device and its DDA compatibility verdict.
Dismounting the GPU from the Host
Before assigning the GPU to a VM, you must remove it from the host OS so that Windows Server 2022 releases exclusive control. This is a two-step process: first disable the device in Device Manager or via PowerShell, then dismount it from the host’s device stack.
First, disable the GPU driver on the host. Open Device Manager, right-click the GPU, and choose Disable Device. Alternatively, use PowerShell:
Disable-PnpDevice -InstanceId "PCIVEN_10DE&DEV_20B0&SUBSYS_147A10DE&REV_A14&2B8A2C4D&0&0009" -Confirm:$false
Replace the InstanceId with the value obtained from Get-PnpDevice. With the device disabled, dismount it from the host using its location path:
$locationPath = "PCIROOT(0)#PCI(0100)#PCI(0000)"
Dismount-VMHostAssignableDevice -LocationPath $locationPath -Force
The -Force flag instructs the hypervisor to suppress any driver-level protests and proceed with the dismount. After this command completes, the GPU will disappear from Device Manager on the host — this is expected behaviour. The GPU is now held by the hypervisor partition and is ready for VM assignment.
Assigning the GPU to a Virtual Machine
With the device dismounted from the host, you can now assign it to a Generation 2 VM. The VM must be powered off for this operation. Ensure the VM’s automatic stop action is set to either Turn off or Shut down — Save State is not compatible with DDA devices.
# Set automatic stop action to avoid save state incompatibility
Set-VM -Name "GPU-VM-01" -AutomaticStopAction TurnOff
# Assign the dismounted GPU to the VM
Add-VMAssignableDevice -VMName "GPU-VM-01" -LocationPath "PCIROOT(0)#PCI(0100)#PCI(0000)"
# Verify the assignment
Get-VMAssignableDevice -VMName "GPU-VM-01"
It is also recommended to configure the VM with a memory buffer to prevent DMA remapping issues with some GPU drivers:
Set-VM -Name "GPU-VM-01" -LowMemoryMappedIoSpace 1GB
Set-VM -Name "GPU-VM-01" -HighMemoryMappedIoSpace 32GB
The low MMIO space (below 4 GB) and high MMIO space (above 4 GB) values depend on the GPU’s BAR (Base Address Register) requirements. For modern high-memory GPUs like the NVIDIA A100 with 80 GB HBM2e, the high MMIO space should be set to at least 32 GB or higher. Check the GPU vendor’s DDA configuration guide for exact values.
Installing GPU Drivers Inside the VM
Power on the VM. Windows inside the VM will detect new hardware. You must install the GPU vendor’s drivers inside the VM — the host drivers are irrelevant to the VM. For NVIDIA data-centre GPUs, download the appropriate driver from the NVIDIA Data Center Driver download portal and run the installer. For AMD Instinct GPUs, use the ROCm or AMDGPU-PRO installer appropriate for the guest OS.
After driver installation and a reboot of the VM, verify the GPU is visible and functional:
# Run inside the VM (PowerShell)
Get-PnpDevice -Class Display | Select-Object FriendlyName, Status
# For NVIDIA GPUs, use nvidia-smi
nvidia-smi
nvidia-smi --query-gpu=name,memory.total,driver_version --format=csv
A healthy output from nvidia-smi confirms the GPU is accessible. You should see the GPU name, VRAM capacity, driver version, and current utilisation.
GPU Partitioning (GPU-P) in Windows Server 2022
GPU Partitioning is the modern replacement for RemoteFX. Introduced in Windows Server 2022, GPU-P allows a single physical GPU to be divided into multiple partitions, each assigned to a different VM. Unlike DDA (which gives one VM exclusive GPU access), GPU-P allows shared access, making it suitable for virtualised desktop infrastructure (VDI) and scenarios where many users need light GPU acceleration simultaneously.
GPU-P requires a GPU with a compatible paravirtualised driver. At the time of writing, NVIDIA supports GPU-P through its NVIDIA Virtual GPU (vGPU) software on supported data-centre GPUs (such as the A-series and T4). The GPU vendor must supply a host driver that exposes the partitioning capability to Hyper-V.
To check whether a GPU supports GPU-P on the host:
Get-VMPartitionableGpu
If a compatible GPU and driver are installed, this cmdlet returns the GPU’s name and the maximum number of partitions it supports. To assign a GPU partition to a VM:
Add-VMGpuPartitionAdapter -VMName "VDI-VM-01"
# Optionally configure the partition size (values 0-1, where 1 = 100% of resources)
Set-VMGpuPartitionAdapter -VMName "VDI-VM-01" -MinPartitionVRAM 0 -MaxPartitionVRAM 1000000000 -OptimalPartitionVRAM 1000000000
GPU-P also requires that the VM’s guest OS has the paravirtualised GPU driver installed. For Windows guests, this driver is often distributed as part of the NVIDIA vGPU guest driver package.
DDA Limitations and Considerations
DDA has several important operational limitations that you must plan around. First, the GPU is exclusively owned by the VM while it is running — no other VM or the host can use that GPU concurrently. If you need to remove the GPU from the VM, shut the VM down and run Remove-VMAssignableDevice, then remount it on the host with Mount-VMHostAssignableDevice.
# Remove DDA device from VM
Remove-VMAssignableDevice -VMName "GPU-VM-01" -LocationPath "PCIROOT(0)#PCI(0100)#PCI(0000)"
# Remount to host
Mount-VMHostAssignableDevice -LocationPath "PCIROOT(0)#PCI(0100)#PCI(0000)"
Second, VM checkpoints (snapshots) are not supported when a VM has a DDA device assigned. Attempting to take a checkpoint will fail. If you need checkpoint capability, DDA is incompatible with that workflow — consider GPU-P instead.
Third, live migration of VMs with DDA devices is not supported. The VM must be powered off before it can be moved between hosts.
Fourth, consumer NVIDIA GeForce GPUs contain driver-level checks that detect virtualisation environments and may refuse to initialise or report Code 43 errors in Device Manager inside the VM. This is a licensing restriction enforced by NVIDIA, not a technical limitation of DDA itself. Data-centre and professional GPUs (Quadro, RTX Pro, Tesla, A-series, H-series) do not have this restriction.
Use Cases for DDA GPU Passthrough
DDA GPU passthrough on Windows Server 2022 is most commonly used for machine learning training workloads where a VM needs full, unshared access to a high-VRAM GPU. Frameworks such as PyTorch and TensorFlow installed inside the VM interact with the GPU driver as if the hardware were physically present, achieving near-bare-metal throughput for CUDA or ROCm operations.
Media encoding pipelines that use hardware NVENC (NVIDIA) or VCE (AMD) acceleration benefit from DDA because the encoding APIs require direct hardware access. Video production workloads running applications like DaVinci Resolve or Adobe Premiere Pro in a VM can leverage the full GPU for timeline rendering and export.
3D CAD and scientific visualisation applications (such as ANSYS, Siemens NX, or Autodesk Inventor) that rely on OpenGL or Vulkan for interactive 3D viewports can function correctly inside a DDA-enabled VM, provided the VM’s remote display protocol (such as HP RGS or PCoIP) supports 3D acceleration.
GPU passthrough is also used to consolidate multiple compute workloads onto a single physical server while maintaining isolation between tenants — each VM owns its GPU entirely, preventing cross-VM interference at the hardware level.