العربية

GPU and USB Passthrough in Proxmox: Hand a Device to One VM

Last updated: December 2, 2026

A graphics card and a USB stick next to a small server, with a cable running into a virtual machine window.

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

⚡ Quick Answer: The host needs IOMMU with interrupt remapping, which means VT-d on Intel or AMD-Vi on AMD, switched on in the firmware. The device must sit in its own IOMMU group, or share one only with its own functions, its root port or its bridge. If those two things hold, the rest is configuration. If they do not, no amount of command line will fix it.

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

  1. 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=on on the kernel command line.
  2. Optionally add iommu=pt to the kernel command line. This is IOMMU passthrough mode, and it can improve performance by letting DMA requests go straight to the hardware IOMMU.
  3. Load the modules. Create /etc/modules-load.d/vfio.conf containing vfio, vfio_iommu_type1 and vfio_pci, one per line. Mediated devices such as vGPUs do not need this, because the host driver owns the card.
  4. Refresh the initramfs with update-initramfs -u -k all and reboot.
  5. Confirm the modules are loaded with lsmod | grep vfio, and that IOMMU is on with dmesg | 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:

Terminal
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.

⚠️ Warning: There is an escape hatch called 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:5678 in a .conf file under /etc/modprobe.d/, with the IDs from lspci -nn.
  • Or blacklist the host driver entirely, with blacklist DRIVERNAME, using the driver name that lspci -k reports.

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.

❤️

Support Our Content

Your donation helps us keep going

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:

Terminal
qm set 101 -hostpci0 02:00,pcie=on,x-vga=on

The options that matter:

  • x-vga=on marks 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=on gives the guest a PCIe port. It needs q35, and some guest and device pairs only work this way.
  • rombar=off hides the card's firmware ROM, which a few devices require.
  • Passing 00:02 instead of 00:02.0 takes 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:

Terminal
lsusb | grep Alcor
Bus 002 Device 013: ID 058f:6387 Alcor Micro Corp. Flash Drive

Pass it by vendor and product ID:

Terminal
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

  • dmesg shows IOMMU and interrupt remapping enabled.
  • The card sits in a clean IOMMU group, or shares only with its own functions.
  • lspci -nnk shows 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

  1. Installing Proxmox VE on old hardware
  2. Backups with vzdump and Proxmox Backup Server
  3. Storage: ZFS, LVM-thin and a directory on ext4
  4. Networking: bridges, VLANs and static addresses
  5. GPU and USB passthrough (this guide)
  6. Updates, repositories and snapshots

Sources: the Proxmox VE PCI(e) Passthrough wiki page and the USB Devices in Virtual Machines wiki page.

📬
Home Lab and Proxmox Guides

Get Home Lab Guides That Actually Work

Practical Proxmox, Docker and self-hosting guides based on official documentation and delivered to your inbox from Valley4Techs.

🔒 100% free. No spam, ever. Unsubscribe with one click anytime.

Add Valley4Techs as a Preferred Source

Follow us on Google News for the latest updates

Add Now
Comments