Understanding GPU passthrough support in Proxmox

I use Proxmox CLI GPU Passthrough when I need raw GPU power inside a VM. This keeps the noise down and gets straight to the checks that matter. I’m assuming a single Proxmox host on a recent Proxmox VE release, with root or sudo access.

Start by enabling IOMMU on the host. Edit GRUB and add the kernel parameter for your CPU: intel_iommu=on iommu=pt for Intel, or amd_iommu=on iommu=pt for AMD. For example, edit /etc/default/grub and change the GRUB_CMDLINE_LINUX_DEFAULT line, then run update-grub and reboot.

After reboot, check the kernel messages with:

dmesg | grep -e DMAR -e IOMMU

That should confirm IOMMU is active. Find the GPU and its device IDs with:

lspci -nn | grep -i 'vga|3d|nvidia|amd'

Note the slot, for example 0000:01:00.0, and the vendor:product IDs like 10de:1b80. If the card is split across IOMMU groups, list them with:

for g in /sys/kernel/iommu_groups/*; do echo "Group $(basename $g)"; ls $g/devices; done

Poor IOMMU grouping is common on consumer motherboards.

Bind the GPU to vfio on the host so it is unavailable to the host kernel. Create /etc/modprobe.d/vfio.conf with a line such as:

options vfio-pci ids=10de:1b80,10de:10f0

Use your own IDs. Blacklist the host driver and nouveau where needed: create /etc/modprobe.d/blacklist.conf with:

blacklist nouveau
blacklist nvidia

If you blacklisted nouveau, regenerate initramfs:

update-initramfs -u

Reboot, then confirm the GPU is bound to vfio-pci with:

lspci -nnk -s 01:00.0

Look for Kernel driver in use: vfio-pci.

Assign the GPU to the VM via the CLI. Either edit the VM config at /etc/pve/qemu-server/VMID.conf and add a line like:

hostpci0: 0000:01:00.0,pcie=1

Or run:

qm set VMID --hostpci0 0000:01:00.0,pcie=1

For devices with audio functions, add x-vga=1 if the guest needs VGA:

hostpci0: 0000:01:00.0,pcie=1,x-vga=1

Set the CPU model to host to cut down on emulation issues:

qm set VMID --cpu host

Give the VM enough RAM and disable CPU hotplug for better stability. Start the VM with:

qm start VMID

Inside the guest, check lspci and the GPU driver. For Windows guests, use Device Manager and confirm the device appears. For Linux guests, run lspci -nn and the GPU driver utilities.

If the host still claims the device, re-check lspci -nnk on the host and confirm vfio-pci is the driver in use. If the guest sees the device but the driver fails, check Windows error codes or dmesg in Linux. If IOMMU groups block passthrough, pcie_acs_override=downstream on the kernel line can split groups on many motherboards; use it only if you accept weaker isolation. Consumer Nvidia cards may still block drivers in the guest if the vendor check gets in the way. In that case, vendor workarounds such as x-vga=1 and passing through the GPU’s audio function too are sometimes needed. If GPU reset fails on reboot, try a host power-cycle or test the card in another slot.

For performance and reliability, keep the VM simple. Use --cpu host. Give the VM dedicated CPU cores and avoid overcommitting the host. Use hugepages for heavier GPU workloads in Linux guests. Disable ballooning and KSM for GPU VMs. Keep host drivers minimal and do not run the GPU on the host. Test each change on one VM before applying it to others.

The pattern is straightforward: enable IOMMU, check the groups, bind the GPU to vfio-pci, assign it with qm set or the VM config, then verify it inside the guest. Keep the steps short and repeatable.

Related posts

Immich | v3.3.6

Immich v3 3 6: onnxruntime telemetry disabled in ML container, anonymous metrics stopped, upgrade to v3 3 6 to restore privacy, thanks to the community

Ransomware group fragmentation and detection priorities

Ransomware group fragmentation means the label matters less than the behaviour, and I trust activity over reputation every time. A small crew with rented services can do plenty of damage, so I watch...

k3s | v1.37.2+k3s1

k3s update: upgrades embedded Kubernetes to 1372, bumps core components, backports stability fixes, and improves CI, testing and reproducible builds