我在 dom0 上使用 CentOS 5.4,使用原装 Xen 内核。我尝试使用 pciback 模块隐藏主机的一些以太网端口,并将它们保留给打算用作防火墙的 domU(此处描述的过程和这里)。然而,当我启动 domU 时,我收到以下错误消息:
Using config file "/etc/xen/firewall".
Error: pci: improper device assignment specified: pci: 0000:01:04.0 must be co-assigned to the same guest with 0000:01:06.0, but it is not owned by pciback.
lspci 给出以下输出:
00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) SATA IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
01:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
01:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
01:07.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
从错误消息来看,似乎我还需要将 eth0(PCI ID 01:04.0)专用于 domU。我说得对吗?如果不是,我做错了什么?谢谢!
答案1
正确 - 多功能设备(通过规格) 必须分配给同一个域。
但是,在某些情况下它仍然有效。您可能会很幸运 - 看起来同一张卡上有多个设备,而不是单个多功能设备。
尝试设置pci-passthrough-strict-check no
一下/etc/xen/xend-config.sxp
,它可能会起作用。