[讨论/分享] 分享一个ubuntu虚拟918+开启photo人脸识别的办法 |
本帖最后由 ma20at 于 2021-10-7 02:08 编辑
![]() 2.虚拟机虚拟gpu设置部分,我懒得截图,直接把虚拟机的配置文件贴出来,直接参考最后<graphics type="spice">到结束部分。 <domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm"> <name>dsm7</name> <uuid>dd64d1c6-cd37-4e1f-9d88-d6e4eb148bc1</uuid> <metadata> <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> <libosinfo:os id="http://redhat.com/rhel/6.0"/> </libosinfo:libosinfo> </metadata> <memory unit="KiB">8388608</memory> <currentMemory unit="KiB">8388608</currentMemory> <vcpu placement="static">4</vcpu> <os> <type arch="x86_64" machine="pc-i440fx-focal">hvm</type> </os> <features> <acpi/> <apic/> <vmport state="off"/> </features> <cpu mode="custom" match="exact" check="partial"> <model fallback="allow">kvm64</model> </cpu> <clock offset="utc"> <timer name="rtc" tickpolicy="catchup"/> <timer name="pit" tickpolicy="delay"/> <timer name="hpet" present="no"/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <pm> <suspend-to-mem enabled="no"/> <suspend-to-disk enabled="no"/> </pm> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type="file" device="disk"> <driver name="qemu" type="raw"/> <source file="/var/lib/libvirt/images/dsm7boot.img"/> <target dev="sda" bus="sata"/> <boot order="1"/> <address type="drive" controller="0" bus="0" target="0" unit="0"/> </disk> <disk type="file" device="disk"> <driver name="qemu" type="raw"/> <source file="/var/lib/libvirt/images/dsm7os.img"/> <target dev="sdb" bus="sata"/> <address type="drive" controller="0" bus="0" target="0" unit="1"/> </disk> <disk type="file" device="disk"> <driver name="qemu" type="raw"/> <source file="/var/lib/libvirt/images/ds7soft.img"/> <target dev="sdc" bus="sata"/> <address type="drive" controller="0" bus="0" target="0" unit="2"/> </disk> <disk type="block" device="disk"> <driver name="qemu" type="raw" cache="none" io="native"/> <source dev="/dev/disk/by-id/wwn-0x5000039fe6e2f731-part1"/> <target dev="sdd" bus="sata"/> <address type="drive" controller="0" bus="0" target="0" unit="3"/> </disk> <disk type="block" device="disk"> <driver name="qemu" type="raw" cache="none" io="native"/> <source dev="/dev/disk/by-id/wwn-0x5000cca097df7be5"/> <target dev="sde" bus="sata"/> <address type="drive" controller="0" bus="0" target="0" unit="4"/> </disk> <disk type="block" device="disk"> <driver name="qemu" type="raw" cache="none" io="native"/> <source dev="/dev/disk/by-id/md-uuid-dd395b79:b830c522:8a7eee05:aa2b9700"/> <target dev="sdf" bus="sata"/> <address type="drive" controller="0" bus="0" target="0" unit="5"/> </disk> <controller type="usb" index="0" model="ich9-ehci1"> <address type="pci" domain="0x0000" bus="0x00" slot="0x06" function="0x7"/> </controller> <controller type="usb" index="0" model="ich9-uhci1"> <master startport="0"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x06" function="0x0" multifunction="on"/> </controller> <controller type="usb" index="0" model="ich9-uhci2"> <master startport="2"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x06" function="0x1"/> </controller> <controller type="usb" index="0" model="ich9-uhci3"> <master startport="4"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x06" function="0x2"/> </controller> <controller type="pci" index="0" model="pci-root"/> <controller type="sata" index="0"> <address type="pci" domain="0x0000" bus="0x00" slot="0x07" function="0x0"/> </controller> <controller type="virtio-serial" index="0"> <address type="pci" domain="0x0000" bus="0x00" slot="0x08" function="0x0"/> </controller> <interface type="bridge"> <mac address="00:11:32:12:34:e6"/> <source bridge="br0"/> <model type="virtio"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x0"/> </interface> <serial type="pty"> <target type="isa-serial" port="0"> <model name="isa-serial"/> </target> </serial> <console type="pty"> <target type="serial" port="0"/> </console> <channel type="unix"> <target type="virtio" name="org.qemu.guest_agent.0"/> <address type="virtio-serial" controller="0" bus="0" port="1"/> </channel> <channel type="spicevmc"> <target type="virtio" name="com.redhat.spice.0"/> <address type="virtio-serial" controller="0" bus="0" port="2"/> </channel> <input type="tablet" bus="usb"> <address type="usb" bus="0" port="1"/> </input> <input type="mouse" bus="ps2"/> <input type="keyboard" bus="ps2"/> <graphics type="spice"> <listen type="none"/> <gl enable="yes" rendernode="/dev/dri/by-path/pci-0000:00:02.0-render"/> </graphics> <video> <model type="none"/> </video> <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-pci" display="on"> <source> <address uuid="e03e1b1a-45cf-4876-8a09-99a0db1bd79a"/> </source> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0"/> </hostdev> <memballoon model="virtio"> <address type="pci" domain="0x0000" bus="0x00" slot="0x09" function="0x0"/> </memballoon> </devices> <qemu:commandline> <qemu:arg value="-set"/> <qemu:arg value="device.hostdev0.x-igd-opregion=on"/> <qemu:arg value="-set"/> <qemu:arg value="device.hostdev0.ramfb=on"/> <qemu:arg value="-set"/> <qemu:arg value="device.hostdev0.driver=vfio-pci-nohotplug"/> <qemu:env name="INTEL_DEBUG" value="norbc"/> </qemu:commandline> </domain> 3.上图看看效果。 ![]() |
wjq_xp 发表于 2021-10-7 16:52 我的是9代奔腾G5500T跟cpu无关,我虚拟机给的是kvm64的虚拟cpu一样可以识别,关键是显卡直通后能否识别,另外虚拟机得用bios引导uefi就是不行,可能跟显卡的firemware有关。只要i915能驱动的intel HD6xx系列应该都用吧。 root@dsm7:~# lsmod|grep i915;ll /dev/dri i915 1310034 0 drm_kms_helper 121097 1 i915 drm 311151 3 i915,drm_kms_helper iosf_mbi 4298 1 i915 fb 34959 2 i915,drm_kms_helper video 27139 1 i915 backlight 6219 2 i915,video button 5105 1 i915 i2c_algo_bit 5456 1 i915 total 0 drwxr-xr-x 2 root root 80 Oct 7 01:16 . drwxr-xr-x 12 root root 14240 Oct 7 01:17 .. crw------- 1 root root 226, 0 Oct 7 01:16 card0 crw-rw---- 1 root videodriver 226, 128 Oct 7 01:16 renderD128 root@dsm7:~# |
ma20at 发表于 2021-10-7 20:38 我是i3 8100,ESXI直通核显安装的918-7.01,目前EMBY可以硬解的,证明核显是认的;还可以登录QC,证明SN也是没问题的;引导试过UEFI和传统,都不能人脸识别。就是不知道ESXI下怎么设置了。 |
wjq_xp 发表于 2021-10-7 22:10 把引导输出和synofoto.log的输出弄出来看看。 dmesg |grep i915 ; grep libsynophoto-plugin-face.so /var/log/synofoto.log |
试试删除索引重新reindex
/var/packages/SynologyPhotos/target/usr/bin/synofoto-bin-clear-index-task -t all /var/packages/SynologyPhotos/target/usr/bin/synofoto-bin-index-tool -t reindex -i /volume4/photo(改成照片实际的目录) |
ma20at 发表于 2021-10-8 21:17 显示的错误信息是: uncaught thread task exception /source/synofoto/src/daemon/plugin/plugin_worker.cpp:90 plugin init failed: /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-face.so |
wjq_xp 发表于 2021-10-9 09:37 ![]() pcipSaveOPROM=TRUE pciPassthru0.opromEnabled=TRUE |
chi65215180 发表于 2021-10-11 16:53 能否截图看下你的虚拟机硬件配置吗? |
xgxxl 发表于 2021-10-11 20:29 人脸识别失败,已经给删了,教程网上有的,先做gvt-g直通,https://www.xltyu.com/3299.html,然后就是普通的pve虚拟机,usb引导方式进去的。 |