GPU Passthrough
Reference for inspecting and configuring GPU / TPU passthrough on Proxmox: device identification (lspci), VFIO module setup, IOMMU validation, initramfs / GRUB updates and per-VM passthrough config (qm set hostpci, machine q35, bios ovmf).
IOMMU must be enabled in BIOS / UEFI
Enable IOMMU in firmware first: look for VT-d, AMD-Vi or IOMMU in BIOS/UEFI. AMD enables IOMMU by default on the Linux side, as do Intel systems with Proxmox kernels 6.8 and newer. Older Intel kernels may need
intel_iommu=on. The optional iommu=pt setting controls IOMMU passthrough mode; it is not a reason to disable the host framebuffer indiscriminately.Device Identification
| Command | Description | Action |
|---|---|---|
| lspci -nn | grep -i nvidia | List NVIDIA PCI devices | |
| lspci -nn | grep -i vga | List all VGA compatible devices | |
| lspci -nn | grep -i amd | List AMD PCI devices | |
| lspci -nnk | grep -A3 VGA | List VGA devices with kernel drivers | |
| lspci -v -s <PCI_ID> | Show detailed info for specific PCI device |
VFIO Configuration
| Command | Description | Action |
|---|---|---|
| dmesg | grep -i vfio | Check VFIO module messages | |
| cat /etc/modprobe.d/vfio.conf | Review VFIO passthrough configuration | |
| ls -la /etc/modprobe.d/ | List all modprobe configuration files | |
| cat /etc/modules | Show modules loaded at boot time | |
| lsmod | grep vfio | Check if VFIO modules are loaded |
IOMMU Configuration
| Command | Description | Action |
|---|---|---|
| cat /etc/default/grub | Review GRUB options for IOMMU | |
| update-grub | Apply GRUB changes | |
| dmesg | grep -i iommu | Check IOMMU messages in kernel log | |
| dmesg | grep -e DMAR -e IOMMU | Check DMAR and IOMMU messages | |
| find /sys/kernel/iommu_groups/ -type l | sort -V | List IOMMU groups |
System Updates
| Command | Description | Action |
|---|---|---|
| update-initramfs -u | Apply initramfs changes (VFIO) | |
| update-initramfs -u -k all | Update initramfs for all kernels | |
| cat /proc/cmdline | Show current kernel boot parameters |
VM Configuration
| Command | Description | Action |
|---|---|---|
| qm config <vmid> | grep hostpci | Show PCI passthrough config for a VM | |
| qm set <vmid> -hostpci0 <PCI_ID>,pcie=1,x-vga=1 | Add GPU passthrough to a VM | |
| cat /etc/pve/qemu-server/<vmid>.conf | View VM configuration file | |
| qm set <vmid> -machine q35 | Set VM to use Q35 chipset (recommended for passthrough) | |
| qm set <vmid> -bios ovmf | Set VM to UEFI/OVMF (recommended when the GPU ROM supports UEFI) |
After changing GRUB or modprobe configs
On hosts using GRUB, apply boot-option changes with
update-grub. Refresh module changes with update-initramfs -u -k all, then reboot. Other bootloaders require their own configuration procedure. Verify with cat /proc/cmdline (kernel parameters), dmesg | grep -i iommu (IOMMU initialised) and find /sys/kernel/iommu_groups/ -type l | sort -V (groups present).Related
- Add GPU to VM (Passthrough) — interactive ProxMenux flow.
- Add GPU to LXC — share host GPU device access with an LXC container.
- Help and Info overview.