previous post: PVE setup in n100
grub 配置
edit /etc/default/grub
1
| GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on i915.enable_guc=3 i915.max_vfs=7"
|
After edit
1 2 3
| update-grub update-initramfs -u reboot
|
modules 配置
edit /etc/modules
1 2 3 4
| vfio vfio_iommu_type1 vfio_pci vfio_virqfd
|
1 2
| wget http://mirrors.ustc.edu.cn/proxmox/debian/dists/bookworm/pve-no-subscription/binary-amd64/proxmox-headers-6.5.11-8-pve_6.5.11-8_amd64.deb dpkg -i proxmox-headers-6.5.11-8-pve_6.5.11-8_amd64.deb
|
安装依赖包
1
| apt install -y build-* git unzip dkms
|
下载并编译sriov驱动
代码下载
1 2
| cd /usr/src git clone https://github.com/strongtz/i915-sriov-dkms i915-sriov-dkms-6.5
|
代码修改
edit /usr/src/i915-sriov-dkms-6.1/dkms.conf with the following:
1 2
| PACKAGE_NAME="i915-sriov-dkms" PACKAGE_VERSION="6.5"
|
编译
1 2
| dkms install --force -m i915-sriov-dkms -v 6.5 reboot
|
重启后查看dmesg
1
| dmesg | grep -ie guc -ie hc -ie sriov
|
显示 Running in SR-IOV PF mode,说明驱动加载成功
设置核显切分
1
| echo 7 > /sys/devices/pci0000:00/0000:00:02.0/sriov_numvfs
|
lspci | grep -i vga
显示有8个显卡,说明切分成功