Skip to content

Instantly share code, notes, and snippets.

@emanuellopes
Last active May 7, 2025 09:39
Show Gist options
  • Save emanuellopes/a43d978f1b3604b07209a12cdf951ae3 to your computer and use it in GitHub Desktop.
Save emanuellopes/a43d978f1b3604b07209a12cdf951ae3 to your computer and use it in GitHub Desktop.
Proxmox passthrough VM and LXC

Asrock rack x470d4u

Proxmox Documentation

  1. Edit grub and rewrite grub parameters
nano /etc/default/grub

Note: You should also append the iommu=pt parameter. This will prevent Linux from touching devices which cannot be passed through.

GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt pcie_acs_override=downstream,multifunction"

The properties pcie_acs_override=downstream,multifunction, it's mandatory, without them, proxmox will crash.

In theory this board/cpu have problems with iommu groups, gpu can be solved using this, not tested https://www.reddit.com/r/homelab/comments/b5xpua/the_ultimate_beginners_guide_to_gpu_passthrough/ GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction nofb nomodeset video=vesafb:off,efifb:off"

1.1. Update Grub

update-grub
  1. Update modules
nano /etc/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

2.1. Allow unsafe interrupts

echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/iommu_unsafe_interrupts.conf

2.2. Ignore kvm

echo "options kvm ignore_msrs=1" > /etc/modprobe.d/kvm.conf

2.2. Update kernel modules

update-initramfs -u -k all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment