3

For an Ubuntu 12.04 server and KVM/libvirt 1.0.0 with an Intel 82599 network chip:

following these docs: http://wiki.libvirt.org/page/Networking#Assignment_from_a_pool_of_SRIOV_VFs_in_a_libvirt_.3Cnetwork.3E_definition

I can get a single pool of SRIOV networks on one PF ( eth0 for example) but when I try to get four pools, or a pool with four PFs, I get an error. "Duplicate ID 'hostdev0' for device" ... (I am able to get four PFs for each VM via manually specifying using the hostdev stanza in the create xml file.)

My temp network xml is:

 <network>
   <name>passthrough_eth0</name>
   <forward mode='hostdev' managed='yes'>
     <pf dev='eth0'/>
   </forward>
 </network>

And it seems that I need to name the hostdevs 0..3 but I don't see how?

John P. Fisher
  • 470
  • 4
  • 9
  • You might want to look at this, to get the idea of how to use SRIOV with libvirt: https://github.com/oVirt/vdsm/blob/master/vdsm_hooks/sriov/before_vm_start.py – dyasny Feb 26 '14 at 15:53
  • That looks like you are doing exactly what my current code does : making hostdev stanzas in the xml file. ( your code is better though) What I am looking for is the pool approach so a user can move a VM to another hypervisor without knowing the lspci output. – John P. Fisher Feb 26 '14 at 16:36
  • yeah, this is just the start script. You want to create a pool, and additional scripts that run before and after migrations on src and dest hosts. ovirt has that already for VMFEX and the approach can be adapted to SRIOV IMO. Check out the rest of the scripts at https://github.com/oVirt/vdsm/tree/master/vdsm_hooks/sriov and the vmfex pool building approach at https://github.com/oVirt/vdsm/tree/master/vdsm_hooks/vmfex The explanations at the vmfex side are very detailed (I know, I wrote them :) ) – dyasny Feb 26 '14 at 18:48

2 Answers2

2

The documentation states that you need libvirt 0.10.0 for this feature, but Ubuntu 12.04 LTS contains 0.9.8. You will need to upgrade to use this feature.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • Already past libvirt 0.10.0 on our blades. Lotsa things don't work prior to that. As I said, the feature works for one PF, but not ( so far) for four per VM. – John P. Fisher Feb 26 '14 at 16:27
  • Please edit your question to include relevant information. Comments are ephemeral, and easily missed anyway. – Michael Hampton Feb 26 '14 at 16:48
1

It's a bug: https://bugzilla.redhat.com/show_bug.cgi?id=1001881

I did search the bugzilla list, but not well enough. Fixed In Version: libvirt-0.10.2-29.el6

John P. Fisher
  • 470
  • 4
  • 9