PCIe Passthrough
Make sure to Use either Legacy or EFI
Legacy Systems
Edit the Grub file
Edit Grub
nano /etc/default/grub
Intel
Add the following line to the Grub File
Add to Grub - Intel
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
AMD
Add the following line to the Grub File
Add to Grub - AMD
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on"
Update Grub
update-grub
EFI Boot Systems
Edit the cmdline File
Edit cmdline File
nano /etc/kernel/cmdline
Intel IOMMU
Add the following to the cmdline file.
For Intel
intel_iommu=on
AMD IOMMU
Add the following to the cmdline file.
For AMD
amd_iommu=on
Refresh Boot Tools
Refresh Boot tools
proxmox-boot-tool refresh
Load VFIO at Boot
Edit Modules
Edit Modules
nano /etc/modules
Add the Following to the /etc/modules file.
Add to file
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
Blacklist Drivers on Proxmox
Blacklist Drivers
echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/iommu_unsafe_interrupts.conf
echo "options kvm ignore_msrs=1" > /etc/modprobe.d/kvm.conf
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
echo "blacklist nvidia" >> /etc/modprobe.d/blacklist.conf
Configure GPU for PCIe Passthrough
!!! note Use lspci to find the correct prefix for your GPU.
Configure GPU for Passthrough
lspci -n -s 01:00
Add to vfio.conf
Make sure to update Values
Replace XXXX:XXXX,XXXX:XXXX with the variables for the nvidia GPU.
Add to vfio.conf
echo "options vfio-pci ids=XXXX:XXXX,XXXX:XXXX disable_vga=1"> /etc/modprobe.d/vfio.con
Apply All Changes
Apply Changes
update-initramfs -u -k all
Reboot
Reboot
reboot -f