N100 PVE 核显分身直通
一、前提摘要
大家好,我是玖玖,最近入手了N100 EQ12零刻的小主机
安装了PVE,子系统如下:
飞牛OS
群晖NAS
Ubuntu
iKuai
OpenWRT
发现N100可以SR-IOV分身直通
二、直通介绍
This package is highly experimental, you should only use it when you know what you are doing.
You need to install this dkms module in both host and guest!
Tested kernel versions: 6.12.10-zen1/6.11.9-arch1/6.10.9-arch1/6.9.10-arch1/6.8.9-arch1 with ArchLinux
Required Kernel Parameters
intel_iommu=on i915.enable_guc=3 i915.max_vfs=7 module_blacklist=xe
Besides intel_iommu=on, the other 3 parameters could be applied by modprobe by putting following content to /etc/modprobe.d/i915-sriov-dkms.conf
blacklist xe
options i915 enable_guc=3
options i915 max_vfs=7Creating Virtual Functions (VF)
echo 1 > /sys/devices/pci0000:00/0000:00:02.0/sriov_numvfs
You can create up to 7 VFs on Intel UHD Graphics
三、直通PVE宿主机端配置
Install build tools:
apt install build-* dkmsInstall the kernel and headers for desired version:
apt install proxmox-headers-6.8 proxmox-kernel-6.8(for unsigned kernel).Download deb package from the releases page
wget -O /tmp/i915-sriov-dkms_2025.07.22_amd64.deb "https://github.com/strongtz/i915-sriov-dkms/releases/download/2025.07.22/i915-sriov-dkms_2025.07.22_amd64.deb"Install the deb package with dpkg:
dpkg -i /tmp/i915-sriov-dkms_2025.07.22_amd64.debOnce finished, the kernel commandline needs to be adjusted:
nano /etc/default/gruband changeGRUB_CMDLINE_LINUX_DEFAULTtointel_iommu=on i915.enable_guc=3 i915.max_vfs=7 module_blacklist=xe, or add to it if you have other arguments there already.Update
grubandinitramfsby executingupdate-grubandupdate-initramfs -uOptionally pin the kernel version and update the boot config via
proxmox-boot-tool.In order to enable the VFs, a
sysfsattribute must be set. Installsysfsutils, then doecho "devices/pci0000:00/0000:00:02.0/sriov_numvfs = 7" > /etc/sysfs.conf, assuming your iGPU is on 00:02 bus. If not, uselspci | grep VGAto find the PCIe bus your iGPU is on.Reboot the system.
When the system is back up again, you should see the number of VFs under 02:00.1 - 02:00.7. Again, assuming your iGPU is on 00:02 bus.
You can passthrough the VFs to LXCs or VMs. However, never pass the PF (02:00.0) to VM which would crash all other VFs.
四、飞牛OS配置
打开应用商店,安装dkms-i915这个包,重启即可
五、群晖/Ubuntu端配置
Install build tools
apt install build-* dkms linux-headers-$(uname -r) linux-modules-extra-$(uname -r)Download and install the
.debwget -O /tmp/i915-sriov-dkms_2025.07.22_amd64.deb "https://github.com/strongtz/i915-sriov-dkms/releases/download/2025.07.22/i915-sriov-dkms_2025.07.22_amd64.deb" dpkg -i /tmp/i915-sriov-dkms_2025.07.22_amd64.debUpdate kernel parameters
nano /etc/default/gruband changeGRUB_CMDLINE_LINUX_DEFAULTtoi915.enable_guc=3 module_blacklist=xe, or add to it if you have other arguments there already.Example:
GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on i915.enable_guc=3 module_blacklist=xe"Once that's done, update
grubandinitramfs, then reboot.update-grub update-initramfs -uOnce the VM is back up again, do
dmesg | grep i915to see if your VF is recognized by the kernel. You should also check ifxeis blacklisted correctly by runninglspci -nnkto see which driver is in use by the VF.Optionally, install
vainfoby runningapt install vainfo, then dovainfoto see if the iGPU has been picked up by the VAAPI.If OpenCL is desired:
apt install intel-opencl-icd apt install clinfo clinfo
- 感谢你赐予我前进的力量

