物理黑群晖也可以开启硬件直通了,创建飞牛虚拟机,调用核显

部分代码转自:https://jimizhou.com/diskstation-vmm-gpu-passthrough

lspci
intel_iommu=on

iommu=pt

vfio-pci.ids=8086:a7a0
dmesg | grep -i iommu

modprobe vfio-pci

echo 0000:00:02.0 > /sys/bus/pci/drivers/i915/unbind

echo 8086 a7a0 > /sys/bus/pci/drivers/vfio-pci/new_id

echo 0000:00:02.0 > /sys/bus/pci/drivers/vfio-pci/bind

lspci -s 00:02.0 -vvv | grep driver
igpu.xml

<hostdev mode='subsystem' type='pci' managed='yes'>
    <driver name='vfio' />
     <source>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </source>
</hostdev>

virsh list

cd /usr/local/bin

wget  http://share.geekxw.top/sa6400-Passthrough.sh

sed -i 's/e40bc847-7212-4e59-94c2-a6812dec8fed/11111111111111111/g' sa6400-Passthrough.sh

vi sa6400-Passthrough.sh

cat sa6400-Passthrough.sh

chmod +x /usr/local/bin/sa6400-Passthrough.sh
vi /etc/systemd/system/sa6400-Passthrough.service

[Unit]
Description=Auto-attach iGPU to fnOS
After=network.target libvirtd.service

[Service]
Type=simple
ExecStart=/usr/local/bin/sa6400-Passthrough.sh
Restart=always

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl start sa6400-Passthrough
sudo systemctl enable sa6400-Passthrough
systemctl status sa6400-Passthrough
© 版权声明
THE END
喜欢就支持一下吧
点赞1 分享
评论 共2条
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片快捷回复
    • 头像YQ0
    • 头像axiang0