Published 2026-02-17 by TechNet Team
GPU passthrough allows a Hyper-V virtual machine to have direct, exclusive access to a physical GPU, achieving near-native performance. This guide covers passing through an NVIDIA RTX 5090 to a Hyper-V VM using Discrete Device Assignment (DDA).
What You'll Achieve
- Full RTX 5090 access in your VM (98-99% native performance)
- Native CUDA, DirectX, and OpenGL support
- GPU-accelerated applications running in the VM
- 32GB VRAM available to guest OS
What You'll Lose
- GPU unavailable to host OS while assigned
- VM checkpoints/snapshots disabled
- Live migration disabled
- Cannot share GPU with other VMs
DDA vs GPU-P: Which to Use?
DDA (Discrete Device Assignment) - What we're using:
- Full GPU passthrough to a single VM
- 100% native performance (no virtualization overhead)
- Exclusive access - only one VM can use the GPU
- Works with RTX 5090 on Server 2022
GPU-P (GPU Partitioning) - Alternative method:
- Virtualized GPU sharing between host and VMs
- 5-10% performance overhead
- Multiple VMs can share one GPU
- NOT supported for RTX 5090 on Server 2022 (requires Server 2025)
Recommendation: Use DDA for RTX 5090 until GPU-P support matures.
Prerequisites
Hardware Requirements
- CPU with IOMMU/VT-d support (Intel) or AMD-Vi (AMD)
- Motherboard with IOMMU support
- RTX 5090 GPU in a PCIe slot that supports DDA
- Secondary GPU for host OS (integrated or discrete)
Software Requirements
- Windows Server 2019/2022 or Windows 11 Pro/Enterprise
- Hyper-V role installed
- Administrator privileges
- Latest NVIDIA drivers (for guest OS)
BIOS/UEFI Settings
Enable these in your BIOS before starting:
- VT-x / AMD-V (Virtualization Technology)
- VT-d / AMD-Vi (IOMMU)
- SR-IOV (if available)
- Above 4G Decoding (important for large GPUs)
- Resizable BAR (optional, may improve performance)
Step 1: Identify Your RTX 5090
First, find your GPU's device information:
# List all display adapters
Get-PnpDevice -Class Display | Where-Object {$_.Status -eq "OK"}
Look for the RTX 5090 in the output and note the InstanceId:
FriendlyName: NVIDIA GeForce RTX 5090
InstanceId: PCI\VEN_10DE&DEV_2B85&SUBSYS_14461962&REV_A1\C1F5E10353532DB04800
Status: OK
Step 2: Get GPU Location Path
# Replace with your GPU's InstanceId from Step 1
$gpuInstanceId = "PCI\VEN_10DE&DEV_2B85&SUBSYS_14461962&REV_A1\C1F5E10353532DB04800"
# Get location path
$gpu = Get-PnpDeviceProperty -InstanceId $gpuInstanceId -KeyName DEVPKEY_Device_LocationPaths
$gpu.Data
Example output:
PCIROOT(20)#PCI(0101)#PCI(0000)
Save both values - you'll need them throughout this guide.
Step 3: Create and Configure the VM
# VM Configuration
$VMName = "GPU-VM"
$VMPath = "C:\Hyper-V\VMs"
$VHDPath = "C:\Hyper-V\VHDs\GPU-VM.vhdx"
$VHDSize = 512GB
$MemoryStartup = 32GB
$ProcessorCount = 16
# Create VM
New-VM -Name $VMName `
-MemoryStartupBytes $MemoryStartup `
-Generation 2 `
-NewVHDPath $VHDPath `
-NewVHDSizeBytes $VHDSize `
-Path $VMPath `
-SwitchName "Default Switch"
# Configure VM
Set-VM -Name $VMName -ProcessorCount $ProcessorCount
Set-VM -Name $VMName -StaticMemory
Set-VM -Name $VMName -AutomaticCheckpointsEnabled $false
Step 4: Configure VM for DDA
# Disable checkpoints (required for DDA)
Set-VM -Name $VMName -CheckpointType Disabled
# Configure MMIO space for GPU
# RTX 5090 has 32GB VRAM - allocate sufficient MMIO
Set-VM -Name $VMName -LowMemoryMappedIoSpace 1GB
Set-VM -Name $VMName -HighMemoryMappedIoSpace 64GB
# Enable nested virtualization (optional)
Set-VMProcessor -VMName $VMName -ExposeVirtualizationExtensions $true
Step 5: Prepare the GPU for Passthrough
CRITICAL: Ensure VM is STOPPED before proceeding!
Stop-VM -Name $VMName -Force
Disable the GPU in Host
# Use the InstanceId from Step 1
$gpuInstanceId = "PCI\VEN_10DE&DEV_2B85&SUBSYS_14461962&REV_A1\C1F5E10353532DB04800"
# Disable GPU in host OS
Disable-PnpDevice -InstanceId $gpuInstanceId -Confirm:$false
Your display may flicker or switch to secondary GPU. This is normal.
Dismount GPU from Host
# Use your LocationPath from Step 2
$locationPath = "PCIROOT(20)#PCI(0101)#PCI(0000)"
# Dismount GPU (makes it available for DDA)
Dismount-VMHostAssignableDevice -LocationPath $locationPath -Force
Verify GPU is Available
# List all assignable devices
Get-VMHostAssignableDevice
# Check for RTX 5090 specifically
Get-VMHostAssignableDevice | Where-Object {$_.InstanceID -like "*2B85*"}
Note: The InstanceID now starts with PCIP\ (with a 'P') instead of PCI\ - this is correct!
Step 6: Assign GPU to VM
# IMPORTANT: Use PCIP\ format (note the P!)
$assignableInstanceId = "PCIP\VEN_10DE&DEV_2B85&SUBSYS_14461962&REV_A1\C1F5E10353532DB04800"
$locationPath = "PCIROOT(20)#PCI(0101)#PCI(0000)"
$VMName = "GPU-VM"
# Assign GPU to VM
Add-VMAssignableDevice -VMName $VMName `
-InstancePath $assignableInstanceId `
-LocationPath $locationPath
Verify Assignment
Get-VMAssignableDevice -VMName $VMName
Step 7: Install Guest OS and Drivers
- Attach Windows ISO and start the VM
- Install Windows 11 (follow standard installation)
- After installation, open Device Manager
- You'll see "Microsoft Basic Display Adapter" - this is normal
- Download and install NVIDIA drivers from nvidia.com
- Reboot the VM
Step 8: Verify Installation
Inside the VM, run:
nvidia-smi
Expected output:
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 551.23 Driver Version: 551.23 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 5090 WDDM | 00000000:00:00.0 On | N/A |
| 0% 42C P8 35W / 575W | 0MiB / 32768MiB | 0% Default |
+-----------------------------------------+------------------------+----------------------+
You should see:
- GPU Name: NVIDIA GeForce RTX 5090
- Memory: 32768 MiB (32 GB VRAM)
- Driver loaded successfully
Troubleshooting
VM Won't Start After GPU Assignment
Check if Hyper-V is running:
Get-Service vmms
Start-Service vmms
GPU Not Visible in Guest
Verify MMIO space allocation:
Get-VM -Name $VMName | Format-List HighMemoryMappedIoSpace
# Should be 64GB or higher
If incorrect:
Stop-VM -Name $VMName
Set-VM -Name $VMName -HighMemoryMappedIoSpace 64GB
Start-VM -Name $VMName
"Generic Failure" When Disabling GPU
GPU may be in use. Try dismounting without disabling first:
Dismount-VMHostAssignableDevice -LocationPath $GPULocationPath -Force
VM Blue Screens on Start
Increase MMIO space and verify BIOS settings:
Stop-VM -Name $VMName
Set-VM -Name $VMName -HighMemoryMappedIoSpace 128GB
Start-VM -Name $VMName
Cannot Dismount GPU
Stop NVIDIA processes first:
Get-Process | Where-Object {$_.Path -like "*NVIDIA*"}
Stop-Process -Name "nvcontainer" -Force -ErrorAction SilentlyContinue
Dismount-VMHostAssignableDevice -LocationPath $GPULocationPath -Force
Reverting: Return GPU to Host
To remove the GPU from the VM and return it to the host:
# Stop VM
Stop-VM -Name $VMName -Force
# Remove GPU from VM
Remove-VMAssignableDevice -VMName $VMName `
-InstancePath $GPUInstancePath `
-LocationPath $GPULocationPath
# Mount GPU back to host
Mount-VMHostAssignableDevice -LocationPath $GPULocationPath
# Enable GPU in host
Enable-PnpDevice -InstanceId $GPUInstanceId -Confirm:$false
If display doesn't appear on RTX 5090 after reverting, restart your computer.
Performance Expectations
| Metric | Native | DDA Passthrough | Performance |
|---|---|---|---|
| 3DMark Time Spy | ~25,000 | ~24,500 | 98% |
| CUDA Compute | 100% | 99% | 99% |
| Memory Bandwidth | 1008 GB/s | 1000 GB/s | 99.2% |
Quick Reference
| Task | Command |
|---|---|
| List display adapters | Get-PnpDevice -Class Display |
| Check assignable devices | Get-VMHostAssignableDevice |
| Check VM GPU assignment | Get-VMAssignableDevice -VMName "GPU-VM" |
| Check VM MMIO config | Get-VM -Name "GPU-VM" | FL *Mapped* |
| GPU info (in guest) | nvidia-smi |
Key Takeaways
- DDA provides 98-99% native performance - virtually no overhead
- RTX 5090 does NOT support GPU-P on Windows Server 2022 - use DDA
- MMIO space is critical - allocate at least 64GB for RTX 5090
- Host needs secondary GPU - RTX 5090 won't be available to host
- Checkpoints must be disabled - DDA is incompatible with VM snapshots
- Use static memory - dynamic memory reduces performance
Need help with GPU passthrough, Hyper-V configuration, or virtualization? Contact TechNet New England for professional support.