Last updated: December 2, 2026

A virtual GPU is fine until the workload needs the real thing.
Passthrough hands a physical PCI device to one virtual machine, which then drives it directly. The Proxmox documentation lists what that buys: lower latency, higher performance, and features the emulated hardware does not have, such as hardware video encoding or CUDA. It also states the price plainly. Once a device is passed through, the host and every other VM lose it. This part covers the setup for a GPU and for USB devices, with the checks that tell you whether your hardware will cooperate before you spend an evening on it. The facts come from the Proxmox PCI(e) passthrough and USB documentation.
This is part 5 of our Proxmox home lab series. If the machine is not installed yet, start with how to install Proxmox VE. If you are still choosing disks, part 3 on Proxmox storage covers ZFS, LVM-thin and the ext4 directory. Part 4 on Proxmox networking covers bridges and VLANs.
What You Need Before You Start
Two facts save the most wasted time:
- Server boards and CPUs support this far more reliably than consumer boards. Consumer hardware often works, but the documentation is explicit that bad firmware implementations and missing quality-of-implementation break it.
- A GPU passed through to a VM cannot be shown in the Proxmox web console. NoVNC and SPICE cannot display its frame buffer. Either put a monitor on the card, or use remote desktop software inside the guest. If you only want CUDA or OpenCL, no display is needed at all.
Enable IOMMU on the Host
- Turn on IOMMU in the firmware. It is usually called IOMMU, VT-d or AMD-Vi. AMD CPUs enable it by default, and recent kernels, 6.8 or newer, do the same for Intel. On older kernels an Intel host needs
intel_iommu=onon the kernel command line. - Optionally add
iommu=ptto the kernel command line. This is IOMMU passthrough mode, and it can improve performance by letting DMA requests go straight to the hardware IOMMU. - Load the modules. Create
/etc/modules-load.d/vfio.confcontainingvfio,vfio_iommu_type1andvfio_pci, one per line. Mediated devices such as vGPUs do not need this, because the host driver owns the card. - Refresh the initramfs with
update-initramfs -u -k alland reboot. - Confirm the modules are loaded with
lsmod | grep vfio, and that IOMMU is on withdmesg | grep -e DMAR -e IOMMU -e AMD-Vi.
Check the IOMMU Group Before Anything Else
This is the step that decides whether the project is possible:
pvesh get /nodes/{nodename}/hardware/pci --pci-class-blacklist ""
Look at the group number of your card. A GPU sharing a group with its own HDMI audio function is fine. Sharing with its root port or PCIe bridge is also fine. Sharing with an unrelated device, such as a SATA controller or a USB controller, is the problem case: passing the card through would take that device with it.
If the groups are wrong, move the card to another PCIe slot and look again. Some boards route slots through different root ports. If the group is still polluted, the platform may simply not support what you want.
allow_unsafe_interrupts=1 in a file under /etc/modprobe.d/. The documentation says it can make your system unstable, and that is not a formality: it turns off a protection that keeps a misbehaving device from writing over host memory. Treat it as a last resort on a lab machine, never on something you care about.Bind the Device to vfio-pci
Proxmox tries to free the device from the host driver automatically. When that does not happen, there are two routes, and both end with an initramfs refresh and a reboot.
- Tell vfio-pci which IDs to claim:
options vfio-pci ids=1234:5678in a .conf file under /etc/modprobe.d/, with the IDs fromlspci -nn. - Or blacklist the host driver entirely, with
blacklist DRIVERNAME, using the driver name thatlspci -kreports.
If the device still gets claimed by its normal driver, the documentation suggests a soft dependency so vfio-pci loads first, for example softdep DRIVERNAME pre: vfio-pci.
Verify with lspci -nnk. The device is ready when the line reads Kernel driver in use: vfio-pci, or when the "in use" line is missing altogether.
Add the Device to the VM
Best compatibility for a GPU comes from the q35 machine type, OVMF firmware and PCIe. One catch: OVMF needs a UEFI-capable ROM on the card, and older cards do not have one, so they need SeaBIOS instead.
In the web interface, open the VM's Hardware tab, choose Add, then Host PCI. On the command line, the same thing is one option:
qm set 101 -hostpci0 02:00,pcie=on,x-vga=on
The options that matter:
x-vga=onmarks the card as the VM's primary GPU, and the normal virtual display setting is then ignored. Use it when the guest should boot on that card.pcie=ongives the guest a PCIe port. It needs q35, and some guest and device pairs only work this way.rombar=offhides the card's firmware ROM, which a few devices require.- Passing
00:02instead of00:02.0takes every function of the device, the same as the All Functions checkbox.
USB Devices, Which Are Much Easier
USB needs no IOMMU and no vfio. A USB device is claimed by a QEMU process rather than by a kernel driver, so it is a single option.
Find the device on the host:
lsusb | grep Alcor
Bus 002 Device 013: ID 058f:6387 Alcor Micro Corp. Flash Drive
Pass it by vendor and product ID:
qm set 804 -usb0 host=058f:6387
Two devices of the same model share an ID, so for those, pass the port instead: qm set 804 -usb1 host=2-1.2.2, the bus and port from qm monitor and info usbhost. The documentation warns that lsusb -t is not reliable for this, so use the monitor. For a USB 3 device add usb3=yes, and QEMU adds an xHCI controller for it.
The device number in lsusb changes whenever the stick is replugged, which is why the ID-based form keeps working and the port-based form pins one physical socket. Hubs themselves cannot be passed through, only real devices. For a keyboard, a Zigbee stick or a license dongle, hotplugging from the Hardware tab is enough, no reboot required.
A Realistic View for a Home Lab
The machine that hosts the VMs usually has one GPU, and that GPU is also the only way to see the BIOS and the console. Pass it through and the host becomes headless, reachable only over the network. Two arrangements avoid the trap: use a second, cheap card for the host, or accept a headless host and pass the good card to the one VM that needs it. A passed-through GPU also means no snapshots with memory state for that VM in some setups, and a driver update inside the guest can break it until you reboot the VM.
Check Before You Call It Done
dmesgshows IOMMU and interrupt remapping enabled.- The card sits in a clean IOMMU group, or shares only with its own functions.
lspci -nnkshows vfio-pci, or no driver at all, for the device.- The VM is q35, and OVMF only if the card has a UEFI ROM.
- A monitor on the card, or RDP or VNC inside the guest, gives you a picture.
- The USB device appears inside the guest and survives a VM reboot.
Next in the Series
- Installing Proxmox VE on old hardware
- Backups with vzdump and Proxmox Backup Server
- Storage: ZFS, LVM-thin and a directory on ext4
- Networking: bridges, VLANs and static addresses
- GPU and USB passthrough (this guide)
- Updates, repositories and snapshots
Sources: the Proxmox VE PCI(e) Passthrough wiki page and the USB Devices in Virtual Machines wiki page.
We'd love to hear your thoughts! Leave a comment below
and share your experience or questions.