Step-by-Step Guide to GPU Passthrough Setup in Proxmox for Windows 11 and Linux VM


Step 1: Edit GRUB

- Open terminal and execute: 
nano /etc/default/grub
- Change the line to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction nofb nomodeset video=vesafb:off,efifb:off"
- Save changes and exit the editor.

Step 2: Update GRUB

- Execute: update-grub

Step 3: Edit Module Files

- Execute: nano /etc/modules
- Add these lines:
  
  vfio 
  vfio_iommu_type1 
  vfio_pci 
  vfio_virqfd
  
- Save and exit.

Step 4: IOMMU Remapping

a) Edit iommu_unsafe_interrupts.conf

- Execute: nano /etc/modprobe.d/iommu_unsafe_interrupts.conf
- Add: options vfio_iommu_type1 allow_unsafe_interrupts=1
- Save and exit.

b) Edit kvm.conf

- Execute: nano /etc/modprobe.d/kvm.conf
- Add: options kvm ignore_msrs=1
- Save and exit.

Step 5: Blacklist GPU Drivers

- Execute: nano /etc/modprobe.d/blacklist.conf
- Add:
  
  blacklist radeon
  blacklist nouveau
  blacklist nvidia
  blacklist nvidiafb
  
- Save and exit.

Step 6: Adding GPU to VFIO

a) Identify GPU

- Execute: lspci -v
- Note down the GPU details.

b) Identify GPU Vendor Number

- Execute: lspci -n -s (PCI card address)
- Note the GPU vendor number.

c) Edit vfio.conf

- Execute: nano /etc/modprobe.d/vfio.conf
- Add the line:
  
  options vfio-pci ids=(GPU number,Audio number) disable_vga=1
  
  Replace (GPU number,Audio number)` with the numbers noted in step b.
- Save and exit.

Step 7: Update and Restart

a) Update Initramfs

- Execute: update-initramfs -u

b) Restart Proxmox Node

- Execute: reboot

Additional Configuration for Integrated GPU Passthrough

Configuration for Intel Integrated GPU Passthrough:

- For Intel CPUs with integrated graphics.
- Edit GRUB:
  
  nano /etc/default/grub
  
  Replace the line with:
  
  GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on i915.enable_gvt=1 iommu=pt pcie_acs_override=downstream,multifunction video=efifb:off video=vesa:off vfio_iommu_type1.allow_unsafe_interrupts=1 kvm.ignore_msrs=1 modprobe.blacklist=radeon,nouveau,nvidia,nvidiafb,nvidia-gpu"
  
- Update GRUB: update-grub

- Edit Modules: nano /etc/modules
  Add:
  
  vfio 
  vfio_iommu_type1 
  vfio_pci 
  vfio_virqfd 
  kvmgt
  

- Edit vfio.conf: `nano /etc/modprobe.d/vfio.conf`
  Include iGPU number:
  
  options vfio-pci ids=(GPU number) disable_vga=1
  

- Update Initramfs: update-initramfs -u -k all

- Reboot Proxmox Server Node.

In the VM Hardware:

- Uncheck All Function
- Uncheck PCI-Express
- Reboot the VM

 






© 2024 - ErnesTech - Privacy
E-Commerce Return Policy