Proxmox VM Device Passthrough Hardening Checklist
Passthrough in Proxmox is not a one-line qm set exercise. IOMMU has to be enabled in both the BIOS and the kernel boot line, vfio-pci has to be bound to the target device before the guest claims it, and the host must not be actively using the same GPU or USB port. This checklist walks each prerequisite in order with the exact verification command, so when something is not showing up inside the guest you can pin it to one specific step instead of guessing.
External references: Proxmox PCI Passthrough Documentation, Linux VFIO Subsystem, Intel VT-d Specification.
Step 1: IOMMU Three-Point Check
| Check | Command | Expected | If not met |
|---|---|---|---|
| BIOS VT-d / SVM | dmesg \| grep -i "IOMMU" |
AMD-Vi: 64 bits or Intel dmar present | Enter BIOS, enable VT-d (Intel) or SVM IOMMU (AMD), reboot |
| grub IOMMU flags | cat /proc/cmdline |
intel_iommu=on or amd_iommu=on plus iommu=pt | Edit /etc/default/grub, add flags to GRUB_CMDLINE_LINUX, run grub-mkconfig, reboot |
| IOMMU groups populated | ls /sys/kernel/iommu_groups/ |
Multiple numbered directories present | Groups empty means the first two items did not actually take effect; go back to them. If groups are present, note the group number for the target device |
Step 2: Bind vfio-pci to the Target Device
# Find the vendor:device id of the target
lspci -nn | grep -iE 'nvidia|amd|target-device'
# Example: 01:00.0 VGA [10de:2204]
# Check which IOMMU group this device shares (all devices in the same group must be bound together)
ls /sys/kernel/iommu_groups/<group>/devices/
# Write the udev override for every BDF in the group
echo 'SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{device}=="0x2204", \
ATTR{driver_override}="vfio-pci"' > /etc/udev/rules.d/99-vfio-pci.rules
systemctl restart udev
# Verify: Kernel driver in use should now say vfio-pci
lspci -nnk -s 01:00.0
Pitfall: If the IOMMU group contains a PCIe bridge (root port) alongside the target device, the bridge must be written into the same override rule. Leaving it on the native driver means the group is not fully claimed by vfio-pci and the device will not appear in the guest.
Step 3: Host Conflict Check
GPU:
# Is X or a desktop manager running on this GPU?
ps aux | grep -E 'Xorg|x11vnc|lightdm'
# Present: stop the host display server or switch host to integrated graphics
# Absent: GPU can be exclusively claimed by the guest without issue
USB:
# Find the bus and device number
lsusb
# Unbind on the host side to verify before making it permanent
echo "<busnum>-<devnum>" > /sys/bus/usb/drivers/usb/unbind
# After confirming the passthrough works, move the unbind into a udev rule
Step 4: qm set -- Three Common Mistakes
| Mistake | Correct form | Symptom in guest |
|---|---|---|
| hostpci BDF points at a child function instead of the root port | qm set <vmid> -hostpci0 0000:01:00.0 |
Device invisible in guest lspci |
| Missing pcie=1 | qm set <vmid> -hostpci0 0000:01:00.0,pcie=1 |
GPU or NVMe runs at reduced performance or fails to initialise |
| Missing rombar=0 on a VRAM-constrained GPU | Add rombar=0 to the hostpci line |
Not required, but saves VRAM when the system is tight |
Verify after each change:
qm showconfig <vmid> | grep hostpci
# Inside the guest:
lspci -nn | grep -i 'nvidia\|target-device'
dmesg | tail -20
Three High-Frequency Failure Cases (based on typical production scenarios)
Case 1: IOMMU groups exist but the target GPU is missing from its own group The host dmesg shows Intel IOMMU active and /sys/kernel/iommu_groups/ is populated, but the group containing the target GPU only lists the PCIe bridge, not the GPU itself. Root cause: iommu=pt was missing from the grub boot line. The default DMA remap mode groups the GPU with its bridge; passthrough mode splits them. Add iommu=pt, reboot, and the GPU appears in its own group.
Case 2: GPU passthrough works but the host loses SSH access after reboot The host had two GPUs (integrated plus discrete). The discrete GPU was passed through to the guest. After a host reboot the X server could not find a usable display device because the discrete GPU was no longer available to the host. SSH still works because it does not depend on the display. The fix is to wire the host's display output to the integrated GPU so the host desktop does not depend on the card that was passed through.
Case 3: USB passthrough kills host keyboard and mouse The host's own keyboard and mouse were included in the USB passthrough list. Once the guest claimed them, the host had no input devices. Connect a separate USB keyboard to the host and remove the host's own input devices from the passthrough configuration.
Related Articles
- Proxmox VM Cannot Reach the Network: Bridge vs NAT Triage Tree (P47)
- Proxmox VM Slowness: CPU, Memory, and Disk IO Deep Dive (P48)
- Proxmox Snapshot and Rollback Pitfalls (P50)
Originality Statement
This article is fully original. The checklist structure is derived from the Proxmox PCI Passthrough documentation and the Linux VFIO subsystem documentation, expanded with production-environment failure cases. No existing article was rewritten or repurposed.