4

I would like to expose a virtual 10Gb ethernet interface into a Xen HVM domain. The base OS is Debian Squeeze, 2.6.32 kernel, Xen 4.0.

Is there any way to make this happen without actually having a 10Gb ethernet interface on the bare metal?

We just want to use this as a local interconnect, so the lack of 10Gb PHY isn't a problem, but I can't figure out the right magic to make the guest OS believe it has a 10Gb interface.

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255
Nick Bastin
  • 213
  • 2
  • 8
  • This kind of emulation requires support at the hypervisor and the guest driver level, so unless a solution exists on both ends, it won't be possible. I don't know if such a thing exists though, so I'll let someone else actually "answer" – Mark Henderson Jun 20 '11 at 02:33
  • It shouldn't actually require emulation at the guest driver level - Xen already exposes emulated drivers at the hardware layer to HVM guests, so the question is merely how to make this happen at Dom0, I think. – Nick Bastin Jun 20 '11 at 04:24

1 Answers1

5

Short answer: no (but read the long version below)

Current QEMU emulation layer in Xen does not emulate any 10Gb cards.

However, that does not really matter. I did some testing on Xen (and KVM) some time ago comparing performances of different emulated network adapters for transfers within the same physical machine. One of the tested adapters was an old 10Mb network adapter which was recognized by the guest OS as such. In reality this emulated adapter was able to transfer much faster than 10Mbps.

The previous applies to the other emulated adapters the same way: there is no artificial bandwidth bottleneck in the emulation code. Just use an emulated 1Gb or 100Mb adapter and it will actually transfer faster than that if there are no other bottlenecks.

Note that there are big speed differences between different emulated network cards. You should try several and pick the one which gives you the best results. I think I got the best results (least overhead) with e1000 emulation but I am not sure if this was on Xen or KVM. Instead of emulated hardware, you might be able to use the Xen PV network driver even when running in HVM mode. It should be the fastest but requires that you have the necessary driver in your guest kernel (CONFIG_XEN_PVHVM and CONFIG_NETXEN_NIC are the relevant kernel options). Debian squeeze includes these by default.

snap
  • 1,201
  • 9
  • 17