Xen是否可以configuration为仅将双端口NIC的一个端口专用于domU?

我在我的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。 我对么? 如果没有,我做错了什么? 谢谢!

正确的 – 多function设备(按规格 )必须分配到同一个域。

但是,在某些情况下,它仍然可以工作。 你可能会很幸运 – 看起来你在同一张卡上有多个设备,而不是一个多function设备。

尝试在/etc/xen/xend-config.sxp设置pci-passthrough-strict-check no ,它可能会工作。