Skip to main content

Setup PCI Passthrough

See PCI Passthrough for more detail as to why I am doing these things.

Proxmox doesn't need a GPU, so blacklist the GPUs and prepare them to be passed to guest machines. I am going to use the iGPU with a LXC contianer though for Plex transcoding so while I want the ability disable it, I commented that part out.

Enable Kernel Modules

# /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
+ vfio_pci
+ vfio
+ vfio_iommu_type1
+ vfio_virqfd

Blacklist Drivers

# /etc/modprobe.d/blacklist.conf
+ # blacklist i915
+ blacklist snd_hda_intel
+ blacklist amdgpu

Bind vfio-pci Driver to Devices

# /etc/modprobe.d/vfio.conf
+ # Intel UHD 630 (8086:3e92)
+ # alias pci:v00008086d00003E92sv00001458sd0000D000bc03sc80i00 vfio-pci
+
+ # AMD Radeon RX 560
+ alias pci:v00001002d000067FFsv00001458sd000022FFbc03sc00i00 vfio-pci
+ alias pci:v00001002d0000AAE0sv00001458sd0000AAE0bc04sc03i00 vfio-pci
+
+ options vfio-pci ids=1002:67ff,1002:aae0 disable_vga=1

Rebuild initramfs

The initramfs needs to be rebuilt to reflect the changes I just did.

update-initramfs -u

Update Bootloader

Proxmox uses systemd-boot as the bootloader so I have to make sure to update the boot entries

Update Kernel Parameters

# /etc/kernel/cmdline
- root=ZFS=rpool/ROOT/pve-1 boot=zfs
+ root=ZFS=rpool/ROOT/pve-1 boot=zfs intel_iommu=igfx_off iommu=pt video=efifb:off

Rebuild Bootloader Options

pve-efiboot-tool refresh