Fab*_*hke 3 fedora kvm pci virtual-machine hard-disk
哎哟。今天我想设置一个新的虚拟机来管理我的 8 个硬盘设备。
目前我使用 Fedora 31 作为主机,使用 Debian 9 作为来宾系统。我想通过块设备传递到虚拟机,但不幸的是它不起作用,而且如果不是 RedHat 订阅者,很难找到正确的信息。
那么我做了什么?我尝试使用以下命令连接硬盘。
virsh attach-disk Storage_ZFS_\(Debian\) /dev/sdb vdc
Run Code Online (Sandbox Code Playgroud)
不幸的是我收到以下错误。
error: Failed to attach disk
error: internal error: No more available PCI slots
Run Code Online (Sandbox Code Playgroud)
那么我尝试了什么?我做了一些研究,发现了一些在 SUSE 上有效的东西,<controller type='pci' model='pcie-to-pci-bridge'/>在 VM 部分的某个地方添加了一些东西,但不幸的是它并没有那么好用。仅收到以下错误。
[root@millenium-fbe48 chairman]# virsh edit Storage_ZFS_\(Debian\)
error: internal error: Cannot automatically add a new PCI bus for a device with connect flags 800
Failed. Try again? [y,n,i,f,?]:
error: XML error: The PCI controller with index='0' must be model='pcie-root' for this machine type, but model='pcie-to-pci-bridge' was found instead
Failed. Try again? [y,n,i,f,?]:
error: XML error: The PCI controller with index='0' must be model='pcie-root' for this machine type, but model='pcie-to-pci-bridge' was found instead
Failed. Try again? [y,n,i,f,?]:
error: XML error: The PCI controller with index='0' must be model='pcie-root' for this machine type, but model='pcie-to-pci-bridge' was found instead
Failed. Try again? [y,n,i,f,?]:
error: XML error: The PCI controller with index='0' must be model='pcie-root' for this machine type, but model='pcie-to-pci-bridge' was found instead
Failed. Try again? [y,n,i,f,?]:
error: XML error: The PCI controller with index='0' must be model='pcie-root' for this machine type, but model='pcie-to-pci-bridge' was found instead
Failed. Try again? [y,n,i,f,?]:
Run Code Online (Sandbox Code Playgroud)
有人知道如何处理它,以及如何将硬盘添加到我的来宾虚拟机吗?
小智 5
我能够使用以下方法添加多个 PCI 直通设备。
--config 如果您仅使用 Attach-interface 命令(删除
--live),libvirt 将能够自动添加它知道需要的 pcie-root-port。然后,您只需关闭并重新启动来宾设备,即可将设备添加到正在运行的来宾实例中(从来宾设备进行简单的重新启动是不够的,您需要完全关闭它,以便启动新的 qemu 进程)
所以基本上。
virsh attach-device VM_NAME PCI_entry.xml --configvirsh destroy VM_NAMEvirsh start VM_NAME来源:回复:[libvirt-users] 无法将 pci 网络添加到现有虚拟机