Skip to main content

GPU Passthrough in Proxmox VE: Setting Up NVIDIA and AMD

Proxmox VE · 19.04.2026 · 7 min read
Illustration for “GPU Passthrough in Proxmox VE: Setting Up NVIDIA and AMD”

GPU Passthrough (PCI Passthrough) lets you hand a physical graphics card directly to a virtual machine with native performance. This matters for gaming VMs, AI/ML workloads, rendering, and CUDA/ROCm work — tasks where an emulated or virtual GPU cannot deliver the needed speed.

Requirements for GPU Passthrough

  • A CPU with IOMMU support: Intel VT-d or AMD-Vi.
  • IOMMU enabled in the BIOS/UEFI (VT-d / AMD IOMMU).
  • A separate graphics card for passthrough (not the one the host uses for its own console).
  • A processor and motherboard with isolated IOMMU groups — not every board groups devices equally well.

Step 1: enable IOMMU in the bootloader

# For Intel CPUs -- /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"

# For AMD CPUs
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt"

# Apply the change
update-grub
reboot

# Confirm IOMMU is enabled
dmesg | grep -i iommu | head -5

Step 2: load the vfio modules

# Add to /etc/modules
echo -e "vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd" >> /etc/modules

# Rebuild initramfs
update-initramfs -u -k all

Step 3: find the graphics card's PCI ID

# List all GPUs
lspci -nn | grep -E "VGA|3D|Display"

# Example output:
# 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation RTX 4070 [10de:2786]
# 01:00.1 Audio device [0403]: NVIDIA Corporation [10de:22bc]

# Check the IOMMU group (important!)
for d in /sys/kernel/iommu_groups/*/devices/*; do
  n=${d#*/iommu_groups/*}; n=${n%%/*}
  printf 'IOMMU Group %s ' "$n"
  lspci -nns "${d##*/}"
done | sort -V | grep "01:00"

Common errors explained

  • vfio-pci: probe of 0000:01:00.0 failed with error -16 — the device is already claimed by another driver (usually nvidia or nouveau); the blacklist from step 4 did not take effect before the reboot — check the initramfs build order.
  • The GPU's IOMMU group contains other host devices (a motherboard USB controller, for example) — passing through the whole group takes those devices from the host too; the ACS override patch partially works around this, but it reduces isolation.
  • Code 43 in Windows Device Manager after passing an NVIDIA GeForce card into the VM — the NVIDIA driver deliberately blocks operation inside a virtual machine without the right CPU flag patches; you need kvm=off,hv_vendor_id=proxmox.
  • VM fails to start: kvm: -device vfio-pci,host=01:00.0: vfio: error opening /dev/vfio/16: Device or resource busy — the device is still held by the host or by another VM; confirm nouveau/nvidia are unloaded and no other VM uses the same device.

Step 4: bind the GPU to vfio-pci

# Add to /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:2786,10de:22bc
# (use your GPU's and audio chip's PCI IDs)

# Blacklist the nvidia/nouveau driver on the host
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
echo "blacklist nvidia" >> /etc/modprobe.d/blacklist.conf

update-initramfs -u -k all
reboot

# Confirm the GPU was claimed by vfio
lspci -nnk | grep -A3 "01:00"
# Should show: Kernel driver in use: vfio-pci

Step 5: add the GPU to an already created VM

# Add the PCI device to the VM through the CLI
qm set 100 --machine q35 --bios ovmf --hostpci0 01:00,pcie=1,x-vga=1

# For NVIDIA -- add the patch (hide the VM from the driver)
qm set 100 --args "-cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=proxmox,kvm=off'"

ROM file for NVIDIA: some NVIDIA cards need an explicit VBIOS ROM file to work correctly in a VM. A VBIOS dump can be taken from techpowerup.com or made yourself before the card is passed through.

Comparing ways to split a GPU

OptionVMs per cardRequires GPU supportPerformance
Full passthrough1NoNative
vGPU (NVIDIA)SeveralYes, a vGPU licenseA share of native
SR-IOVSeveralYes, card supportClose to native

Configuration in /etc/pve/qemu-server/100.conf

bios: ovmf
machine: q35
efidisk0: local-lvm:vm-100-disk-0,efitype=4m,size=4M
hostpci0: 0000:01:00.0,pcie=1,x-vga=1
hostpci1: 0000:01:00.1  # GPU Audio
vga: none  # Disable the virtual GPU

When GPU Passthrough does not fit

  • The host has only one graphics card — without integrated CPU graphics for its own console, Proxmox risks losing video output once the only GPU is passed to a VM; set up an alternative output first (IPMI, an iGPU).
  • One card needs to be shared across several VMs without a vGPU license — full passthrough gives the GPU to only one VM at a time; several consumers need SR-IOV or a paid vGPU license.
  • A consumer-grade NVIDIA card is being used for data-center compute under a commercial workload — NVIDIA's license agreement restricts this use of GeForce cards; the data-center line is formally required for that.

Passthrough limitations: a VM with GPU passthrough does not support live migration; one GPU cannot be handed to several VMs at once without vGPU/SR-IOV for splitting; the NVIDIA GeForce line blocks passthrough in a VM without the kvm=off,hv_vendor_id=proxmox patch.

How to verify passthrough is working

# Inside the VM: the graphics card is detected by the system
lspci -nnk | grep -A3 VGA

# Inside the VM (Linux): the NVIDIA/AMD driver is loaded, not a stub
nvidia-smi
# or for AMD:
rocm-smi

# On the host: the device no longer belongs to the host
lspci -nnk -s 01:00.0 | grep "Kernel driver in use"
# Expect: vfio-pci, not nvidia/amdgpu

If nvidia-smi (or rocm-smi) inside the VM shows the card model and its load, and the host lists the device under vfio-pci, the GPU was passed to the virtual machine correctly and runs at native performance.

Frequently asked questions

Does GPU Passthrough work for LXC containers, or does the method described here apply only to full virtual machines?

The vfio-pci approach described here is built specifically for full virtual machines that run their own kernel and drivers inside the guest. LXC containers share the host kernel, so a graphics card is handed over differently, through passing device files into the container rather than vfio-pci binding, and the setup for that case looks noticeably different from the VM steps.

Can one graphics card be handed to several virtual machines at once without a vGPU license?

No, full passthrough locks the device to exactly one virtual machine at any given moment — while one VM holds the card, no other machine can reach it. Splitting a single physical card across several consumers at the same time requires either a paid vGPU license from the manufacturer or hardware-level SR-IOV support built into the card itself.

Why does a consumer-grade NVIDIA GeForce card refuse to work properly inside a virtual machine?

The GeForce driver deliberately detects that it is running inside a virtual machine and blocks full functionality, which shows up in the Windows device manager as a card error. The fix is adding a special patch to the machine's configuration that hides virtualization from the guest system, after which the driver starts up as it would on physical hardware.

What should be done if the server has only one graphics card and no separate video output for the host console?

Passing the server's only graphics card into a virtual machine is risky: once the VM starts, the Proxmox host can lose its own video output and end up manageable only over the network. Before setting up passthrough, arrange an alternative output for the host first, such as integrated CPU graphics or remote access through IPMI, to avoid losing the console.

Was this article helpful?
← Back to Knowledge Base Ask Support