Debian Jessie Qemu KVM GPU 直通到 Windows 虚拟机客户机 Virt-Manager 错误未找到总线 PCI

Debian Jessie Qemu KVM GPU 直通到 Windows 虚拟机客户机 Virt-Manager 错误未找到总线 PCI

我遇到了 Virt-Manager 无法启动虚拟机并出现错误的问题:

Error starting domain: internal error: process exited while connecting to monitor: char device redirected to /dev/pts/3 (label charserial0)
qemu-system-x86_64: -device ioh3420,bus=pci,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1: Bus 'pci' not found

如果我单击“详细信息”,则会出现完整的错误:

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 117, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1160, in startup
self._backend.create()
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 917, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error: process exited while connecting to monitor: char device redirected to /dev/pts/3 (label charserial0)

qemu-system-x86_64:-device ioh3420,bus=pci,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1:未找到总线‘pci’

我使用 virsh edit 手动将一些命令行内容添加到 VM 的 xml 配置中,因为 virt-manager 没有这些选项,例如 GPU BIOS 文件等。以下是 qemu 命令行标签:

<qemu:commandline>
<qemu:arg value='-device'/>
<qemu:arg value='ioh3420,bus=pci,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=04:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on,romfile=/home/me/Downloads/Sapphire.R9280X.3072.131127_2.rom'/>
<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=04:00.1,bus=root.1'/>
<qemu:arg value='-bios'/>
<qemu:arg value='/usr/share/seabios/bios.bin'/>
<qemu:arg value='-cpu'/>
<qemu:arg value='host,kvm=off'/>
</qemu:commandline>

uname -a

Linux vmserver 3.16.0-customvmkernel #1 SMP Sun Sep 28 00:34:42 PDT 2014 x86_64 GNU/Linux

kvm --version

QEMU emulator version 2.1.0 (Debian 2.1+dfsg-4), Copyright (c) 2003-2008 Fabrice Bellard  

答案1

我将 bus=pcie.0 或 bus=pci 更改为 bus=pci.0,显然其名称取决于 xml 文件中使用的架构。我使用的是更流行的机器 q35 定义,默认为 pcie.0

现在启动时已无该错误。

相关内容