Skip to content

Comprehensive tools, scripts, and documentation for managing and optimizing your Proxmox Virtual Environment.

Notifications You must be signed in to change notification settings

kamilllooo/Proxmox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Proxmox VE: Passthrough with Intel Integrated Graphics Card Alder Lake Architecture | vGPU, VT-d, SR-IOV

Table of Contents 📜

  1. A few words from me
  2. Introduction
  3. Prerequisites
  4. My System Specification
  5. Configuration
  6. Summary
  7. My known Firmware Issues
  8. Bonus
  9. Windows 11 Installation
  10. Parrot OS Install
  11. Ubuntu OS
  12. License

A few words from me 💬

I have been looking for a long time for a solution that will help me successfully configure iGPU forwarding on my new hardware. This prompted me to write my first guide. Some of you may find this helpful. I followed the guide Derek Seaman's Tech Blog.
Before I managed to solve the problem with transferring graphics to Windows, it took me two weeks of all my free time. If you appreciate it, give me a follow.

❗ I'm still working on transferring the graphics card to Linux, such as Debian and Ubuntu. ❗
🔥 In Parrot OS works for me. 🔥


Introduction 📝

In this step-by-step guide, we will walk through configuring graphics sharing for Intel integrated graphics on Alder Lake architecture in Proxmox. The guide covers hardware configuration, BIOS settings adjustment, and Proxmox configuration to enable the use of Intel integrated graphics in virtual machines.


Prerequisites

  • Server with Intel Alder Lake processor
  • Installed Proxmox VE
  • Basic command-line proficiency and Linux system configuration knowledge

My System Specification ⚙️

Processor: Intel N305
RAM: 32GB
Graphics Card: Intel UHD Graphics
Host Operating System: Proxmox VE 8.2.2
Kernel Version: Linux pve 6.5.13-3-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.13-3 (2024-03-20T10:45Z) x86_64 GNU/Linux

Configuration 🛠️

Step 1: Initial BIOS Configuration

  1. Access your server's BIOS/UEFI by pressing the appropriate key during boot (usually Delete, F2, or F10).
  2. Enable VT-d (Intel Virtualization Technology for Directed I/O). This option is typically found in the processor's advanced settings section.
  3. Ensure Multi-Monitor Support is enabled to make the integrated graphics card available to the system.
  4. Save changes and exit BIOS/UEFI, then reboot the server.

Step 2: System Update and Required Package Installation

apt update && apt upgrade -y
uname -r

Step 3: Proxmox Kernel Headers Installation and Configuration

apt install proxmox-headers-6.5.13-3-pve proxmox-kernel-6.5.13-3-pve-signed
proxmox-boot-tool kernel pin 6.5.13-3-pve
proxmox-boot-tool refresh
reboot

After reboot, verify that Proxmox is using kernel 6.5.13-3.


Step 4: Installation and Configuration of i915-sriov-dkms

Install additional packages:

apt update && apt install git sysfsutils pve-headers dkms mokutil -y

Remove old versions of i915-sriov-dkms:

rm -rf /var/lib/dkms/i915-sriov-dkms*
rm -rf /usr/src/i915-sriov-dkms*
rm -rf ~/i915-sriov-dkms

Clone the i915-sriov-dkms repository:

cd ~
git clone https://github.com/strongtz/i915-sriov-dkms.git
cd ~/i915-sriov-dkms

Configure dkms.conf:

cp -a dkms.conf{,.bak}
KERNEL=$(uname -r); KERNEL=${KERNEL%-pve}
sed -i 's/"@_PKGBASE@"/"i915-sriov-dkms"/g' dkms.conf
sed -i 's/"@PKGVER@"/"'"$KERNEL"'"/g' dkms.conf
sed -i 's/ -j$(nproc)//g' dkms.conf
cat dkms.conf

Add and install DKMS module:

apt install --reinstall dkms -y
dkms add .
cd /usr/src/i915-sriov-dkms-$KERNEL
dkms status
dkms install -m i915-sriov-dkms -v $KERNEL -k $(uname -r) --force -j 1
dkms status

Import MOK:

mokutil --import /var/lib/dkms/mok.pub

Step 5: IOMMU Configuration

Add or modify the line in /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt i915.enable_guc=3 i915.max_vfs=7"

Update GRUB configuration:

update-grub
reboot

Step 6: SR-IOV Configuration

Add SR-IOV configuration to sysfs.conf:

echo "devices/pci0000:00/0000:00:02.0/sriov_numvfs = 7" > /etc/sysfs.conf
cat /etc/sysfs.conf
reboot

❗ If using Proxmox 8.1 or later with secure boot you MUST setup MOK. As the Proxmox host reboots, monitor the boot process and wait for the Perform MOK management window. If you miss the first reboot you will need to re-run the mokutil command and reboot again. The DKMS module will NOT load until you step through this setup.
Select Enroll MOK > Continue > Yes > 'your_password_MOK_' > Reboot.

Check GPU availability:

lspci | grep VGA
dmesg | grep i915

Summary 📚

After completing these steps, your Intel integrated graphics card should be available for virtual machines on Proxmox. Note that specific BIOS settings may vary depending on the motherboard manufacturer, so refer to the hardware documentation as needed.


My known Firmware Issues ⚠️

🔧 If we have a problem with the firmware Failed to load DMC firmware i915/adlp_dmc.bin. Disabling runtime power management

mv /lib/firmware/i915/adlp_dmc.bin ./adlp_dmc.bin-backup
wget -r -nd -e robots=no -A '*.bin' --accept-regex '/plain/' https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915/adlp_dmc.bin
mv adlp_dmc.bin /lib/firmware/i915/
ls /lib/firmware/i915/

update-initramfs -u
proxmox-boot-tool refresh
reboot

After this steps check again

cat /sys/kernel/debug/dri/0/i915_dmc_info
dmesg | grep i915

🔧 Problems with bad version [drm] *ERROR* GT0: IOV: Unable to confirm version [drm] *ERROR* GT0: IOV: Found interface version Issues link

Edit this file ~/i915-sriov-dkms/drivers/gpu/drm/i915/gt/uc/abi/guc_version_abi.h

#define GUC_VF_VERSION_LATEST_MINOR     0

to

#define GUC_VF_VERSION_LATEST_MINOR     9

Bonus 🎁

Try to use when you have problems. In /etc/modprobe.d/:

cat kvm.conf
options kvm ignore_msrs=1
cat intel-microcode-blacklist.conf
# The microcode module attempts to apply a microcode update when
# it autoloads.  This is not always safe, so we block it by default.
blacklist microcode
cat i915.conf
options i915 enable_guc=3



Windows 11 Installation

  1. Download the tested for me Fedora Windows VirtIO driver ISO from tested me here or check new version on this site.
  2. Download the Windows 11 ISO. I use my custom-prepared Windows specifically designed for x64 devices.
  3. Upload both the VirtIO and Windows 11 ISOs to the Proxmox server.


uploud_image_in_proxmox

  1. Start the VM creation process. On the General tab enter the name of your VM. Click Next.
  2. On the OS tab select the Windows 11 ISO. Change the Guest OS to Microsoft Windows, 11/2022/2025. Tick the box for the Add additional drive for VirtIO drivers, then select your Windows VirtIO ISO. Click Next. Note: The VirtIO drivers option is new to Proxmox 8.1. I added a Proxmox 8.0 step at the end to manually add a new CD drive and mount the VirtIO ISO.


create_vm_windows11_os

  1. On the System page modify the settings to match EXACTLY as those shown below. If your local VM storage is named differently (e.g. NOT local, use that instead)


create_vm_windows11_system

  1. On the Disks tab, modify the size as needed. I suggest a minimum of 55GB. Modify the Cache and Discard settings as shown. Only enable Discard if using SSD/NVMe storage (not a spinning disk).


create_vm_windows11_disks

  1. On the CPU tab, change the Type to host. Allocate however many cores you want. I chose 4.


create_vm_windows11_cpu

  1. On the Memory tab allocated as much memory as you want. I suggest 8GB or more.
  2. On the Network tab change the model to VirtIO.


create_vm_windows11_network

  1. Review your VM configuration. Click Finish.
  2. In Proxmox click on the Windows 11 VM, then open a console. Start the VM, then press Enter to boot from the CD.


create_vm_windows11_start_vm

  1. Select your language, time, currency, and keyboard. Click Next. Click Install now.
  2. Click I don’t have a product key.
  3. Select Windows 11 Pro. Click Next.
  4. Tick the box to accept the license agreement. Click Next.
  5. Click Load driver.

create_vm_windows11_load_vm_drivers   create_vm_windows11_load_vm_drivers2

  1. Select the w11 driver. Click Next.

create_vm_windows11_load_vm_drivers3   create_vm_windows11_load_vm_drivers4   create_vm_windows11_load_vm_drivers5

  1. On Where do you want to install Windows click Next.


create_vm_windows11_install_windows

  1. Sit back and wait for Windows 11 to install.


create_vm_windows11_install_windows2

  1. Configure the system now. I always use a local account when setting up the system. If you want to set a password but don't want to provide a hint, leave the account without a password during the setup. After the first login, go to:

Computer Management > Local Users and Groups > Users > Right-click on your user > Set Password...

  1. When we have set a password (I recommend setting a password because we will be using RDP) for our local account, we can enable Remote Desktop.

Settings > System > Remote Desktop > Click ON


create_vm_windows11_configure_windows

  1. In Windows open the mounted ISO in Explorer. Run virtio-win-gt-x64 and virtio-win-guest-tools. Use all default options.

create_vm_windows11_configure_windows2   create_vm_windows11_configure_windows3

  1. Shutdown Windows.
  2. In the Proxmox console click on the Windows 11 VM in the left pane. Then click on Hardware. Click on the Display item in the right pane. Click Edit, then change it to none.


create_vm_windows11_configure_windows5

  1. In the top of the right pane click on Add, then select PCI Device.
  2. Select Raw Device. Then review all of the PCI devices available. Select one of the sub-function (x.1, x.2, etc..) graphics controllers (i.e. ANY entry except the 00:02.0). Do NOT use the root “0” device, for ANYTHING. I chose 02.6. Click Add. Do NOT tick the “All Functions” box. Tick the box next to Primary GPU. Click Add.


create_vm_windows11_configure_windows4

  1. Start the Windows 11 VM and wait a couple of minutes for it to boot and RDP to become active. Note, the Proxmox Windows console will NOT connect since we removed the virtual VGA device. You will see a Failed to connect to server message. You can now ONLY access Windows via RDP. U can chceck IP address in Summary.


create_vm_windows11_check_ip_address

  1. When you connect to the remote desktop, install the graphics card driver. Due to the type of my graphics setup, I will use Snappy Driver. Of course, you can download it from the official websites if you want. To do this, download and extract the program on the virtual machine, and then run it.

Without drivers | Benchamark site


create_vm_windows11_without_drivers

  1. Allow the firewall access during the startup, and then click "Download Indexes Only".

create_vm_windows11_snappy_driver_installer

  1. Select your graphics card drivers and click Install


create_vm_windows11_snappy_driver_installer2

  1. After installation complete reboot Windows.
  2. Connect again to RDP. Now you can check if the graphics card driver is working. Verify the device status in Device Manager > Display adapters.
  3. If everything is fine, open Task Manager > Performance. You should see your graphics card listed.
  4. Once that's done, open a web browser and enter the URL LINK. You should see that the graphics card is working and displaying more than a few FPS (this depends on how powerful your graphics card is).


create_vm_windows11_with_drivers

  1. Done 😄



Parrot OS Install

Step 1: Configuration

  1. Download the Parrot ISO.
  2. Upload Parrot ISO to the Proxmox server.


uploud_image_in_proxmox

  1. Start the VM creation process. On the General tab enter the name of your VM. Click Next.
  2. On the OS tab select the Parrot ISO. Change the Guest OS to Linux, 6.x - 2.6 Kernel. Click Next.


create_vm_parrot_os

  1. On the System page modify the settings to match EXACTLY as those shown below. If your local VM storage is named differently (e.g. NOT local, use that instead)


create_vm_parrot_system

  1. On the Disks tab, modify the size as needed. I suggest a minimum of 36GB. Modify the Cache and Discard settings as shown. Only enable Discard if using SSD/NVMe storage (not a spinning disk).


create_vm_parrot_disks

  1. On the CPU tab, change the Type to host. Allocate however many cores you want. I chose 4.


create_vm_parrot_cpu

  1. On the Memory tab allocated as much memory as you want. I suggest 6GB or more.
  2. On the Network tab change the model to VirtIO.


create_vm_parrot_network

  1. Review your VM configuration. Click Finish.

Step 2: Instalation

  1. In Proxmox click on the Parrot VM, then open a console. Start the VM, then press Try / Install.

create_vm_parrot_start_vm   create_vm_parrot_start_vm2

  1. Click the "Install Parrot" button when VM boot.


create_vm_parrot_install

  1. Go through the installation wizard, following the on-screen instructions.

create_vm_parrot_install2   create_vm_parrot_install3

  1. Complete the installation and restart the computer.


create_vm_parrot_install4

  1. When the system restarts, shut it down.

Step 3: Post-Installation System Configuration

  1. After the restart, open the terminal and execute the following commands:
sudo passwd  # Set a new root password
su  # Switch to the root account
apt update && apt install openssh-server -y  # Update package list and install SSH server
  1. Edit the /etc/ssh/sshd_config file using your preferred text editor, e.g., nano:
# Add or change the line to:
PermitRootLogin yes
  1. Start and reload the SSH service:
systemctl start ssh && systemctl enable ssh && systemctl reload ssh
  1. Shutdown the computer.

Step 4: Configure the Virtual Machine in Proxmox

  1. In the Proxmox console click on the Parrot VM in the left pane. Then click on Hardware. Click on the Display item in the right pane. Click Edit, then change it to none.


create_vm_parrot_configure_vm2

  1. In the top of the right pane click on Add, then select PCI Device.
  2. Select Raw Device. Then review all of the PCI devices available. Select one of the sub-function (x.1, x.2, etc..) graphics controllers (i.e. ANY entry except the 00:02.0). Do NOT use the root “0” device, for ANYTHING. I chose 02.4. Click Add. Do NOT tick the “All Functions” box. Tick the box next to Primary GPU. Click Add.


create_vm_parrot_configure_vm

  1. Start the Parrot VM and wait a couple of minutes for it to boot and SSH to become active. Note, the Proxmox Windows console will NOT connect since we removed the virtual VGA device. You will see a Failed to connect to server message. You can now ONLY access Windows via SSH. U can chceck IP address in Summary.


create_vm_parrot_check_ip

Step 5: Connect via SSH and Check the Graphics Card

  1. Connect to the server via SSH and check which kernel version you are using. My version is 6.5.0-13parrot1-amd64 (from what I've learned online, the kernel version shouldn't differ much from the Proxmox kernel version. Unfortunately, I cannot confirm this dependency yet).
uname -r  # Display the kernel version
  1. Check if the graphics card is recognized by the system:
lspci | grep VGA  # Display a list of VGA devices


create_vm_parrot_configure_system

Step 6: Install and Configure Graphics Card Drivers

  1. Clone the repository:
git clone https://github.com/strongtz/i915-sriov-dkms  # Clone the repository locally
  1. Modify DKMS configuration to match your kernel version in the i915-sriov-dkms/dkms.conf file:
nano i915-sriov-dkms/dkms.conf
# Change values to:
PACKAGE_NAME="i915-sriov-dkms"
PACKAGE_VERSION="6.5"
  1. Edit the guc_version_abi.h file:
nano i915-sriov-dkms/drivers/gpu/drm/i915/gt/uc/abi/guc_version_abi.h
## Change the line:
#define GUC_VF_VERSION_LATEST_MINOR 0

To:

#define GUC_VF_VERSION_LATEST_MINOR 9
  1. Move the files and install DKMS:
cp -r i915-sriov-dkms/ /usr/src/i915-sriov-dkms-6.5  # Copy the repository to DKMS source directory
dkms install -m i915-sriov-dkms -v 6.5 --kernelsourcedir=/usr/src/linux-headers-6.5.0-13parrot1-amd64 --force  # Install DKMS drivers


create_vm_parrot_configure_system2

  1. Modify GRUB configuration in /etc/default/grub file and update:
nano /etc/default/grub
# Change the line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
# To:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on i915.enable_guc=3"

update-grub  # Update GRUB configuration
update-initramfs -u -k $(uname -r)  # Update initramfs


create_vm_parrot_configure_system3

Step 7: Install Firmware (if required)

  1. If errors appear like in the screenshot below with missing firmware, you need to search for it on the Internet. I couldn't find the exact versions, but I found similar ones. Here is what I did.


create_vm_parrot_configure_system3

  1. Download the missing firmware:
mkdir firmware
cd firmware/
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/i915/mtl_guc_70.bin
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/i915/mtl_huc_gsc.bin
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/i915/mtl_gsc_1.bin

# Rename the files to match the missing ones
mv mtl_guc_70.bin mtl_guc_70.6.4.bin
mv mtl_gsc_1.bin mtl_gsc_102.0.0.1511.bin
mv mtl_huc_gsc.bin mtl_huc_8.4.3_gsc.bin

# Move the files to the appropriate directory
mv *.bin /lib/firmware/i915/

# Additionally, download adlp_dmc.bin
wget -r -nd -e robots=no -A '*.bin' --accept-regex '/plain/' https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915/adlp_dmc.bin
mv /lib/firmware/i915/adlp_dmc.bin ./adlp_dmc.bin-backup
mv adlp_dmc.bin /lib/firmware/i915/

# Update GRUB and initramfs
update-grub
update-initramfs -u -k $(uname -r)
reboot  # Restart the computer

Step 8: Verify the Graphics Card Operation

  1. Check the operation of the graphics card:
dmesg | grep i915  # Display system messages related to the graphics card
lspci | grep VGA  # Display a list of VGA devices
dkms status  # Check the status of installed DKMS modules
  1. List the graphics card:
ls -al /dev/dri/  # Display graphic devices
  1. Install additional software:
apt update && apt install intel-media-va-driver-non-free intel-gpu-tools vainfo -y  # Install graphic drivers and tools
  1. Check the graphics card codecs:
vainfo  # Display video codec information
  1. Done, the graphics card should work correctly. 😄



Ubuntu OS

I managed to partially solve the kernel issue on Ubuntu by installing a fresh Ubuntu 23.10 Live Server, which defaults to kernel 6.5.0-41-generic. This kernel works with DKMS and VGPU passthrough on my setup. Then, I perform an upgrade to Ubuntu 24.04 LTS while keeping the old kernel. This way, I have the latest LTS version running with GPU passthrough on Proxmox. Below is the link to my script. Remember to back up before running it. I also used a fork of i915 from michael-pptf.

Link to the script or use this command:

bash -c "$(wget -qO - https://raw.githubusercontent.com/kamilllooo/proxmox/main/scripts/ubuntu_guest_proxmox_vgpu.sh | tr -d '\r')"

MIT License

Copyright (c) 2024 Kamilllooo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Comprehensive tools, scripts, and documentation for managing and optimizing your Proxmox Virtual Environment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages