Intel SR-IOV GPU
Intel has continued to push forward the graphics virtualization technologies on Intel® graphics processors. The latest of these technologies been Single Root IO Virtualization (SR-IOV) which replaced the previous Intel® Graphics Virtualization Technology –g (GVT-g)
To find which graphics virtualization technology is supported on each Intel® graphics family, refer to the table below:
Product Family | Graphics Virtualization Technology Supported |
---|---|
Intel® Data Center GPU Flex Series discrete graphics family (Formerly Known as Arctic Sound) | Single Root IO Virtualization (SR-IOV) |
12th Gen Intel® Core™ processor family (Formerly Known as Alder Lake) | Single Root IO Virtualization (SR-IOV) |
11th Gen Intel® Core™ processor family (Formerly Known as Tiger Lake) | Single Root IO Virtualization (SR-IOV) |
Hardware & Network
Server: Micro desktop computer DB12, with i5-12500, 64G , 1T NVME
Network: DHCP Service is enable on network.
1. Install Proxmox 7.4
- Download Proxmox ISO image
https://www.proxmox.com/en/downloads
- Boot from USB or CD/DVD
Use rufus create a bootable usb key.
- Configure via GUI
https://<Proxmox_ipaddr>:8006
2.Enable Proxmox Linux kernel 6.1
Run The Script bellow
#!/bin/sh
# Author: DoraCloud Technology Ltd.co
#
# Date: 2023/05/07
#
# DoraCloud for Proxmox Enable vGPU
# Phase 1: update source and update proxmox kernel
echo 'deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription' | tee -a /etc/apt/sources.list
rm /etc/apt/sources.list.d/pve-enterprise.list
apt update && apt dist-upgrade -y
#Update Proxmox
apt update -y
apt dist-upgrade -y
apt install pve-kernel-6.1 -y
reboot
After host is restared, verify the kernel version
root@db12:/var/lib/vz/dump# uname -r
6.1.15-1-pve
2. Install i915-sriov dkms module, Enable iommu, configure the VF
When host is reboot, run the script bellow.
Host will reboot.
#!/bin/sh
# Author: DoraCloud Technology Ltd.co
#
# Date: 2023/05/07
#
# Enable IO-MMU on PVE Server
apt update && apt install pve-headers-$(uname -r)
apt install git dkms build-* unzip -y
wget http://vdi.doracloud.cn:9000/software/i915-sriov-dkms-6.1.tar.gz
tar -zxvf i915-sriov-dkms-6.1.tar.gz -C /usr/src
dkms install -m i915-sriov-dkms -v 6.1
dkms status
# Enable IO-MUU
echo ""
echo "********************************************"
echo "*** Enable IO-MMU on proxmox host ***"
echo "********************************************"
# /etc/default/grub 的GRUB_CMDLINE_LINUX_DEFAULT,add intel_iommu=on iommu=pt
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on i915.enable_guc=3 i915.max_vfs=7"/g' /etc/default/grub
echo ""
echo " Update grub .... "
update-grub
update-initramfs -u
pve-efiboot-tool refresh
echo ""
echo " Install sysfsutils ,set sriov_numvfs=7"
apt install sysfsutils -y
echo "devices/pci0000:00/0000:00:02.0/sriov_numvfs = 7" > /etc/sysfs.conf
echo ""
echo " Please Verify SR-IOV by lspci |grep VGA after reboot ...."
reboot
After host is reboot, verify vgpu is enabled
root@db12:/var/lib/vz/dump# lspci |grep VGA
00:02.0 VGA compatible controller: Intel Corporation Device 4692 (rev 0c)
00:02.1 VGA compatible controller: Intel Corporation Device 4692 (rev 0c)
00:02.2 VGA compatible controller: Intel Corporation Device 4692 (rev 0c)
00:02.3 VGA compatible controller: Intel Corporation Device 4692 (rev 0c)
00:02.4 VGA compatible controller: Intel Corporation Device 4692 (rev 0c)
00:02.5 VGA compatible controller: Intel Corporation Device 4692 (rev 0c)
00:02.6 VGA compatible controller: Intel Corporation Device 4692 (rev 0c)
00:02.7 VGA compatible controller: Intel Corporation Device 4692 (rev 0c)
3. Install deskpool and select intel vgpu on the pool’s options
Install deskpool online by script bellow
cd /var/lib/vz/dump; wget -qO- http://dl.deskpool.com/dpinstall.pl | perl
Setup deskpool follow the wizard. Download a windows 10 image from image repository.
When config the pool,there are options for Intel vGPU. Selct GPU Model: Intel UHD Graphics, Select vGPU Type: Intel vGPU。
When deskpool vm is created, check the vm’s hardware, there is a PCI device in the VM’s hardware.
4. Install intel official driver on desktop vm
Intel official drivers should be installed in the Desktop VM. You can install intel driver in deskpool image or install driver in desktop vm. I use gfx_win_101.4314.
https://www.intel.com/content/www/us/en/download/726609/intel-arc-iris-xe-graphics-whql-windows.html
5. Conclusion
Using Intel SR-IOV technology, seven virtual desktop machines with vGPUs can be built on a single desktop computer hardware.
Refer: https://www.michaelstinkerings.org/gpu-virtualization-with-intel-12th-gen-igpu-uhd-730/