【2022-3-8首次更新】第一次写教程有点烂,不过想必折腾黑裙的都是心灵手巧 .doge 折腾数日终于是搞定了GVT-g 人脸识别,可以说网上所有的坑全踩了一遍,在这写个笔记方便日后查看并分享给网友做参考。 1.首先简单分享下环境 pve 6.4版本 虚拟机开启OVMF Q35 intel i5-9400 3E98核显ID 群晖virtio网卡通信,ds918 7.0.1 UP3 ------------------------------------------------------------------------------------------------------------------- 教程网上看的屡见不鲜了,主要在坑的地方着重讲一下,其他因篇幅会尽量带过 一.PVE开启IOMMU及GVT-g。(此为第一坑) 验证GVT-g开启 代码: ls /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/ 注意替换红色。 此时会出现2-4个i915-GVTg 开头的信息 去webui看下,可用列是不是为0,如果为0,那么恭喜,你的显存过小,需要bios调节或者EFI shell手动修改【安全】 很多人就是卡这里为0,然后无法启动虚拟机 可参考以下链接解决 https://blog.vay1314.top/archives/220.html 二.PVE CONF文件设置。(此为第二坑) 注意,不要WEB添加GVT-g的核心 现在创建mdev 代码: echo 604e42e4-2e90-11ec-8861-037c58d42915 > /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_2/create UUID可替换也可用我的 查看是否创建成功 代码: ls /sys/bus/mdev/devices/ vi /etc/pve/qemu-server/104.conf (104自行替换为对应虚拟机编号) 代码: args: -device vfio-pci,sysfsdev=/sys/bus/mdev/devices/604e42e4-2e90-11ec-8861-037c58d42915,addr=02.0,x-igd-opregion=on,driver=vfio-pci-nohotplug 手动创建的mdev重启就没了,需要配置开机自启 vi /etc/systemd/system/rc-local.service 代码: [Unit] Description=/etc/rc.local ConditionPathExists=/etc/rc.local [Service] Type=forking ExecStart=/etc/rc.local start TimeoutSec=0 StandardOutput=tty RemainAfterExit=yes SysVStartPriority=99 [Install] WantedBy=multi-user.target 加入之前的创建mdev命令 vi /etc/rc.local 代码: echo 604e42e4-2e90-11ec-8861-037c58d42915 > /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_2/create 给权限加入自启 代码: chmod +x /etc/rc.local systemctl enable rc-local systemctl start rc-local.service 至此,直接开机,进入下一步教程 三.替换群晖核显驱动。(可选,需查询显卡ID) 我是UHD630 有2个版本 在pve shell输入 lspci -v -s 00:02.0 代码: 00:02.0 VGA compatible controller: Intel Corporation Device 3e98 (rev 02) (prog-if 00 [VGA controller]) Subsystem: ASUSTeK Computer Inc. Device 8694 Flags: bus master, fast devsel, latency 0, IRQ 155 Memory at f6000000 (64-bit, non-prefetchable) [size=16M] Memory at c0000000 (64-bit, prefetchable) [size=512M] 返回得到是3E98 ,那么我们去下载3E95驱动覆盖群晖内I915.ko 文件 ,重启群晖就行了。 核显驱动参考地址 https://www.openos.org/threads/9101112cpuds918-7-01-42218.3832/ 相关资料参考: https://blog.vay1314.top/archives/220.html https://www.cnblogs.com/jf8710/p/15536198.html#d8
systemctl start rc-local.service Job for rc-local.service failed because the control process exited with error code. See "systemctl status rc-local.service" and "journalctl -xe" for details. rc-local.service - /etc/rc.local Loaded: loaded (/etc/systemd/system/rc-local.service; enabled; vendor preset: enabled) Drop-In: /usr/lib/systemd/system/rc-local.service.d └─debian.conf Active: failed (Result: exit-code) since Thu 2022-03-10 19:57:05 CST; 1min 52s ago Process: 10913 ExecStart=/etc/rc.local start (code=exited, status=203/EXEC) CPU: 770us Mar 10 19:57:05 pve systemd[1]: Starting /etc/rc.local... Mar 10 19:57:05 pve systemd[10913]: rc-local.service: Failed to execute /etc/rc.local: Exec format error Mar 10 19:57:05 pve systemd[10913]: rc-local.service: Failed at step EXEC spawning /etc/rc.local: Exec format error Mar 10 19:57:05 pve systemd[1]: rc-local.service: Control process exited, code=exited, status=203/EXEC Mar 10 19:57:05 pve systemd[1]: rc-local.service: Failed with result 'exit-code'. Mar 10 19:57:05 pve systemd[1]: Failed to start /etc/rc.local. 请问这是什么问题呢?