Skip to content

Prepare for GPU Passthrough

iGPU as Host Device Passthrough

This will pass the whole iGPU to a single VM. This is useful if you want that VM to pass slices of iGPU to docker containers for example.

Tested on a Lenovo M70q Gen3

  • SSH into the Proxmox server.

    Terminal window
    lspci -nn | grep VGA

    Example output:

    Terminal window
    root@pve:~# lspci -nn | grep VGA
    00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:4692] (rev 0c)
  • Grab the ID, for me it was 8086:4692.

  • Add the ID into a .conf file in /etc/modprobe.d

    Terminal window
    nano /etc/modprobe.d/intel-gpu.conf

    Paste:

    Terminal window
    options vfio-pci ids=8086:4692

    gpu-vfio

  • Press CTRL + S to save

  • Press CTRL + X to exit

  • Get GPU driver name

    Terminal window
    lspci -nnk | grep VGA -A5

    Example output:

    Terminal window
    root@pve:~# lspci -nnk | grep VGA -A5
    00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:4692] (rev 0c)
    DeviceName: Onboard - Video
    Subsystem: Lenovo Device [17aa:330b]
    Kernel driver in use: i915
    Kernel modules: i915
  • Grab driver, for me it was i915

  • Blacklist driver

    Terminal window
    nano /etc/modprobe.d/intel-gpu.conf

    Paste:

    Terminal window
    blacklist i915

    gpu-blacklist

  • Press CTRL + S to save

  • Press CTRL + X to exit

  • Update initramfs

    Terminal window
    update-initramfs -u -k all

    Example output:

    Terminal window
    root@pve:~# update-initramfs -u -k all
    update-initramfs: Generating /boot/initrd.img-5.15.74-1-pve
    Running hook script 'zz-proxmox-boot'..
    Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
    No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.

Once you are done with the above, Reboot

iGPU with SR-IOV

It needs at least kernel 5.19 and a modified driver I’ll be waiting for it to hit mainline kernel. Tracking this issue