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
Before any of these commands matter, IOMMU has to be enabled at the firmware level (look for VT-d, AMD-Vi or IOMMU in BIOS / UEFI). Common GRUB parameters to enable it on the Linux side:
intel_iommu=on (Intel) or amd_iommu=on (AMD), often combined with iommu=pt video=efifb:off video=vesa:off.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 use UEFI/OVMF (required for GPU passthrough) |
After changing GRUB or modprobe configs
Run
update-grub + update-initramfs -u, then reboot. 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 — passthrough to a container instead of a VM.
- Help and Info overview.