2

I am using KVM on Centos 7. I have created a VM with SR-IOV VFs to pass traffic. I notice that I am unable to pass traffic when I tag the interface inside the VM. I have read through the internet and the data sheet from Intel but none give me a clear picture of how it is done.

Server1

Eth0 - PF

SR-IOV Enabled

eth0-vf-1 (Attached to VM)

[Inside the VM]

Centos 7

eth0.100

Server2

Eth0 - PF

SR-IOV Enabled

eth0-vf-1 (Attached to VM)

[Inside the VM]

Centos 7

eth0.100

Switch

Extreme Networks

VLAN tagged 100

Port 1,2

Port 1 - Server 1 - Eth0 - PF

Port 2 - Server 2 - Eth0 - PF

Can anyone guide me through this? I would like to know if anyone has tried such a configuration or would this not be the best used case for SR-IOV?

I did find one issue here but did not understand much. Thank you community.

  • Does it work for you or doesn't it? It definitely should, if the switch is configured properly – dyasny Sep 29 '16 at 13:40
  • It does not work for me. I was wondering if anyone every tried using multiple vlans on a VF inside a VM? – Centos Newbie Oct 1 '16 at 12:55
  • see my answer below – dyasny Oct 3 '16 at 14:04
2

I checked, and it looks like with VFs, the tagging needs to be done on the host, via libvirt. The way this looks in the domxml is as follows

<interface type='hostdev' managed='yes'>                                                         
  <mac address=' fa:aa:aa:aa:aa:aa '/>                                                              
  <driver name='kvm'/>                                                                           
  <source>                                                                                       
    <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x7'/>                  
  </source>                                                                                      
  <vlan>                                                                                          
    <tag id='190'/>                                                                              
  </vlan>
  <alias name='hostdev0'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>

Link: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Host_Configuration_and_Guest_Installation_Guide/sect-Virtualization_Host_Configuration_and_Guest_Installation_Guide-SR_IOV-How_SR_IOV_Libvirt_Works.html

  • So it means I can't tag inside the VM? – Centos Newbie Oct 3 '16 at 14:36
  • yes, you can tag inside a VM with a regular virtio NIC or with a regular PCI-passthrough card, but not with SRIOV – dyasny Oct 3 '16 at 14:57
  • After a lot of digging I find your inputs True! Thanks for the prompt answer. You can't tag inside the VM while using SR-IOV – Centos Newbie Oct 12 '16 at 3:51
  • this is in direct conflict if what is stated here: communities.intel.com/thread/52257 – Andre de Miranda Nov 13 '16 at 12:49
  • interesting. I got my information directly from folks working on implementing SRIOV in openstack nova, they should know what they are talking about. The link to the official documentation also points toward my solution. There may be more than one correct answer here, but the o/p confirmed tagging inside the VM didn't work for him – dyasny Nov 15 '16 at 1:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.