Introduction
GPU passthrough allows a virtual machine (VM) to directly use a physical GPU. This is especially useful for:
- AI / Machine Learning workloads
- Video processing
- CUDA-based applications
- High-performance computing
In this guide, we will walk through:
- How to enable GPU passthrough in Proxmox
- How to configure the system
- How to verify that the GPU is successfully enabled
System Overview
In our setup:
- Host: Proxmox (Debian-based)
- GPUs:
- RTX 3060 → assigned to VM
- GT 1030 → used by host
- VM OS: Ubuntu
Step 1: Enable IOMMU (VT-d)
First, enable IOMMU in GRUB.
Edit:
vi /etc/default/grub Update:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt" Apply changes:
update-grub Step 2: Enable VFIO Modules
Edit:
vi /etc/modules Add:
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd Step 3: Blacklist GPU Drivers
Prevent the host from using the GPU.
vi /etc/modprobe.d/blacklist.conf Add:
blacklist nouveau
blacklist nvidia
blacklist nvidiafb
blacklist rivafb Step 4: Bind GPU to VFIO
Identify GPU IDs:
lspci -nn Then configure:
vi /etc/modprobe.d/vfio.conf Example:
options vfio-pci ids=10de:2504,10de:228e Step 5: Update Initramfs
update-initramfs -u -k all Step 6: Reboot
reboot Step 7: Verify GPU Binding
Run:
lspci -nnk | grep -i nvidia -A 3 Expected output:
Kernel driver in use: vfio-pci This confirms the GPU is detached from host and ready for passthrough.
Step 8: Attach GPU to VM
In Proxmox UI:
- Go to VM → Hardware
- Click “Add → PCI Device”
- Select GPU (e.g., 01:00.0)
Enable:
- All Functions
- PCI-Express
- ROM-Bar
Step 9: VM Configuration
Update VM settings:
qm set <VMID> -machine q35
qm set <VMID> -cpu host
qm set <VMID> -hostpci0 0000:01:00,pcie=1 (Optional fix for NVIDIA):
args: -cpu host,kvm=off Step 10: Start VM
qm start <VMID> Step 11: Verify Inside VM
Check GPU detection:
lspci | grep -i nvidia Install driver:
apt update
apt install nvidia-driver -y
reboot Final Verification
Run:
nvidia-smi Expected Output:
- GPU name (RTX 3060)
- Driver version
- CUDA version
- Memory usage
Example:
NVIDIA-SMI 535.xx
GPU: RTX 3060
Memory: 12GB This confirms GPU passthrough is fully working.
Result
You now have:
- GPU successfully passed to VM
- CUDA enabled
- Ready for AI / ML / compute workloads
Key Takeaways
- IOMMU enables hardware-level isolation
- VFIO binds GPU for passthrough
- Proxmox assigns GPU to VM
- nvidia-smi confirms success
Conclusion
GPU passthrough in Proxmox unlocks powerful capabilities such as AI model execution, high-speed rendering, and GPU-accelerated workloads — all within a virtualized environment.
With proper configuration and validation, you can achieve near bare-metal GPU performance inside your VM.
Monitor GPU
Monitor GPU usage in real time:
watch -n 1 nvidia-smi Your GPU is now fully enabled and production-ready