接有偿搭建如有需要进群联系群主
QQ群:113254209
核显SRIOV12-14代都适用
核显直通HDMI4-14代通用
IP配置:
PVE IP:192.168.5.254
iKUAI IP:192.168.5.1
OP IP:192.168.5.253
I226网卡使用 关闭网卡TSO 提高稳定性
cd /etc/systemd/system
新建文件
off_tso.service
enp1s0修改成你对应的网卡
[Unit]
Description=Turn off TSO for NIC
[Service]
Type=oneshot
ExecStart=/usr/sbin/ethtool -K enp1s0 tso off
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
开启 关闭网卡TSO 服务
systemctl enable off_tso.service
systemctl daemon-reload
修改grub启动参数
nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"
内核模块加载模块命令
echo -e "vfio\nvfio_iommu_type1\nvfio_pci\nvfio_virqfd" >> /etc/modules
update-grub
update-initramfs -u -k all
安装IKUAI
安装OPENWRT
qm importdisk 101 /var/lib/vz/template/iso/20230901-Ipv6-Super-6.1-x86-64-generic-squashfs-combined-efi.img local-lvm
更新软件包
PVE 8.0换源脚本: 按顺序执行
wget http://share.geekxw.top/yuan.sh -O yuan.sh && chmod +x yuan.sh && ./yuan.sh
apt update
apt dist-upgrade
update-grub
update-initramfs -u -k all
安装黑群晖
qm importdisk 103 /var/lib/vz/template/iso/
rr_4GB
.img local-lvm
安装WIN11
win11跳过联网 Shift+F10
oobe\bypassnro.cmd
开启核显SRIOV直通或者核显HDMI直通WIN11 二选一
以下是核显SRIOV
apt install -y build-* pve-headers-6.2.16-19-pve git dkms sysfsutils
git clone https://github.com/strongtz/i915-sriov-dkms.git
cp -r i915-sriov-dkms /usr/src/i915-sriov-dkms-6.2
nano /usr/src/i915-sriov-dkms-6.2/dkms.conf
替换
PACKAGE_NAME="i915-sriov-dkms"
PACKAGE_VERSION="6.2"
替换/usr/src/i915-sriov-dkms-6.2/drivers/gpu/drm/i915/display/intel_dp.c
> KERNEL_VERSION(6,4,5)
>= KERNEL_VERSION(6,2,0)
dkms install -m i915-sriov-dkms -v 6.2 --force
nano /etc/default/grub
i915.enable_guc=3 i915.max_vfs=7
nano /etc/sysfs.conf
devices/pci0000:00/0000:00:02.0/sriov_numvfs = 3
最多开七个VF 3为开三个
update-grub
update-initramfs -u
lxc容器配置使用SRIOV核显
/etc/pve/lxc
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri/card0 dev/dri/card0 none bind,optional,create=file
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.apparmor.profile: unconfined
lxc.cap.drop:
安装docker和jellyfin
挂载群晖文件夹
mkdir /mnt/smb
以下ip,文件夹,账号密码改成自己的
sudo mount -t cifs //192.168.3.63/downloads /mnt/smb -o username=xc,password=Zhangsan1@
sudo nano /etc/fstab
//192.168.3.63/downloads /mnt/smb cifs username=xc,password=Zhangsan1@ 0
apt install sudo curl
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
docker run -d \
--name=jellyfin \
--volume /home/docker/jellyfin/config:/config \
--volume /home/docker/jellyfin/cache:/cache \
--volume /mnt/smb:/media \
--net=host \
--restart=unless-stopped \
--device /dev/dri/renderD128:/dev/dri/renderD128 \
--device /dev/dri/card0:/dev/dri/card0 \
nyanmisaka/jellyfin:latest
如果win11使用sriov安装上驱动提示43可以尝试从Q35切换到i440
卸载核显SRIOV
dkms status
sudo dkms remove i915-sriov-dkms/6.2 –all
还原grub
nano /etc/default/grub
update-grub
update-initramfs -u
清除代码
nano /etc/sysfs.conf
核显HDMI直通WIN11
出处:https://www.bilibili.com/read/cv27608215/
/etc/modprobe.d/pve-blacklist.conf 添加以下代码
blacklist i915
blacklist snd_hda_intel
options vfio_iommu_type1 allow_unsafe_interrupts=1
划掉得不用执行了
lspci -n | grep -E "0300"
8086:a780替换成自己的
echo "options vfio-pci ids=8086:a780" >> /etc/modprobe.d/vifo.conf
rom放入位置 /usr/share/kvm/
虚拟机配置文件位置 /etc/pve/qemu-server
视频里面忘记说还要执行以下这两个代码了
update-initramfs -u -k all
reboot
args: -set device.hostpci0.addr=02.0 -set device.hostpci0.x-igd-gms=0x2 -set device.hostpci0.x-igd-opregion=on
bios: ovmf
boot: order=scsi0;net0
cores: 4
cpu: host
efidisk0: local-lvm:vm-100-disk-0,efitype=4m,size=4M
hostpci0: 0000:00:02.0,legacy-igd=1,romfile=4dao14.rom
hostpci1: 0000:00:1f.3
memory: 4096
meta: creation-qemu=8.0.2,ctime=1699556053
name: win11
net0: virtio=CA:9C:7D:43:EA:FE,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local-lvm:vm-100-disk-1,iothread=1,size=32G
scsihw: virtio-scsi-single
smbios1: uuid=0def0e08-4f31-4ac7-98e4-a9c2dd85f5be
sockets: 1
tpmstate0: local-lvm:vm-100-disk-2,size=4M,version=v2.0
usb0: host=1-4.2
usb1: host=1-4.4
vga: none
vmgenid: 85f9abc5-4f1f-4f35-ac88-5967af85cc0f
- 最新
- 最热
只看作者