Use this when a VM needs a full GPU for graphics or compute.
GPU Passthrough
GPU passthrough assigns a whole physical GPU to one VM through VFIO or DirectPath I/O for native graphics or compute performance. It needs IOMMU, a clean IOMMU group, UEFI guest firmware and usually blocks live migration.
1. GPU passthrough: bind GPU and its audio function to vfio.
2. Use OVMF/UEFI and q35.
3. Some GPUs need ROM files or reset fixes.
4. Host must not use the GPU for console.
5. Check guest driver.
GPU + audio → vfio → VM → guest driver
Context & applicabilityCommon mistakes · platform/version boundaries
- Host driver grabbing the GPU before vfio-pci (blacklist the driver).
- Missing ROM BAR or UEFI firmware issues.
- Consumer GPUs with reset bugs needing host reboots.
- Not checking licensing for vGPU solutions.
Operational reference
Fast context before you go deeper.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Clean IOMMU group required.
- UEFI guest firmware usually required.
- Some consumer GPUs need extra tweaks.
lspci -nnk | grep -A3 -i vga— GPU bound to vfio-pcinvidia-smi— guest driver sees GPUqm config <vmid> | grep hostpci— Proxmox GPU config
ReferenceWhy it matters1 section · depth on demand
Practical issues
- NVIDIA consumer GPUs used to show "Code 43" in VMs; current drivers allow passthrough, but hiding the hypervisor (
hidden=on) may still be needed with older drivers. - Some AMD GPUs have reset bugs (vendor-reset module).
- Pass through the GPU's audio function too (same group).
- Use OVMF/UEFI and q35; set
x-vga=1only for primary GPU use. - For sharing one GPU between VMs, use vendor vGPU or SR-IOV-capable GPUs.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
GPU passthrough specifics:
- Bind both GPU functions (video and HDMI audio) to vfio-pci.
- Use q35 + OVMF (UEFI) and
pcie=1;x-vga=1for a primary display GPU. - Some GPUs need a clean ROM (
romfile=) or must not be used by the host console during boot (video=efifb:off). - AMD consumer GPUs may suffer the reset bug (cannot reset after VM shutdown) —
vendor-resetmodule or host reboot. - NVIDIA consumer cards work with current drivers in VMs (the old "Code 43" block was removed in driver 465+).
For many users on one GPU, use vendor vGPU/SR-IOV instead of full passthrough.
Options
| Option | Notes |
|---|---|
| Full GPU passthrough | One VM per GPU, native drivers |
| NVIDIA vGPU (licensed) | Share data-centre GPUs between VMs |
| SR-IOV GPUs (some AMD/Intel) | Hardware partitioning |
| Intel GVT-g / SR-IOV iGPU | Integrated GPU sharing |
| VirGL / Venus | Paravirtual 3D, limited performance |
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in PCI & Device Passthrough → GPU Passthrough. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/driver-api/vfio.html · confidence 94%