proxmox

How to Set Up GPU Passthrough in Proxmox

Running a virtual machine that needs real graphics performance — for gaming, transcoding, or AI workloads — requires more than Proxmox’s default virtual display. Setting up GPU passthrough in Proxmox gives a virtual machine direct, near-native access to a physical GPU, unlocking performance that emulated graphics simply can’t match.

What Is GPU Passthrough?

GPU passthrough uses a virtualization feature called IOMMU (Input-Output Memory Management Unit) to dedicate a physical GPU directly to a single virtual machine. Instead of sharing graphics resources through emulation, the VM gets exclusive, direct hardware access, allowing it to run games, video editing software, or GPU-accelerated applications at nearly the same performance as running on bare metal.

Requirements Before You Start

  • A CPU and motherboard that support IOMMU (Intel VT-d or AMD-Vi)
  • A second GPU, since your Proxmox host still needs its own display output (either integrated graphics or a separate dedicated card)
  • BIOS/UEFI settings with virtualization and IOMMU support enabled

Step 1: Enable IOMMU in BIOS

Restart your server and enter the BIOS/UEFI settings. Enable Intel VT-d (Intel systems) or AMD-Vi/IOMMU (AMD systems), along with standard virtualization support (VT-x or AMD-V) if not already active.

Step 2: Enable IOMMU in Proxmox

Edit the GRUB configuration file:

nano /etc/default/grub

For Intel CPUs, modify the line to include:

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"

For AMD CPUs, use:

GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on"

Update GRUB and reboot:

update-grub
reboot

Step 3: Load VFIO Kernel Modules

Add the required modules to /etc/modules:

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

Step 4: Identify Your GPU’s PCI IDs

Run the following to find your GPU’s vendor and device IDs:

lspci -nn | grep -i vga

Note the IDs shown in brackets (e.g., 10de:1b80), as you’ll need them to bind the GPU to VFIO instead of the host’s native driver.

Step 5: Bind the GPU to VFIO

Create a configuration file to blacklist the GPU from Proxmox’s own drivers and assign it to VFIO:

nano /etc/modprobe.d/vfio.conf

Add:

options vfio-pci ids=10de:1b80,10de:10f0

(Replace with your actual GPU and audio device IDs.) Then update initramfs and reboot:

update-initramfs -u -k all
reboot

Step 6: Add the GPU to a Virtual Machine

In the Proxmox web UI, open your VM’s Hardware tab, click Add → PCI Device, and select your GPU from the list. Make sure All Functions is checked to pass through both the graphics and audio components of the card together.

Common Issues to Watch For

  • IOMMU groups – some motherboards group multiple devices together, making it impossible to pass through just the GPU alone without also passing through unrelated hardware sharing the same group
  • Code 43 errors on NVIDIA cards – NVIDIA GPUs sometimes detect virtualization and disable themselves; this usually requires additional VM configuration to hide the hypervisor signature

Final Thoughts

Configuring GPU passthrough in Proxmox takes more steps than typical VM setup, but the payoff is a virtual machine with genuine hardware-accelerated graphics performance. Whether you’re building a gaming VM, a video transcoding server, or an AI/ML workload, passthrough unlocks capabilities that emulated graphics simply cannot provide.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *