[libvirt-users] Adding a VLAN tag to a libvirt SR-IOV VF network using the "virsh net-update" command

Yegappan Lakshmanan yegappan at yahoo.com
Wed Jul 11 04:33:27 UTC 2018


Hi all,
How do you add a VLAN tag to a libvirt SR-IOV VF network usingthe "virsh net-update" command? I couldn't find the section to passto the "virsh net-update" command to add the VLAN tag.
I have the following libvirt network defined for a SR-IOV VF:
<network>  <name>GE0-0-SRIOV-1</name>  <uuid>7bc67166-c78e-4bcf-89ee-377dd9086631</uuid>  <forward mode='hostdev' managed='yes'>    <driver name='vfio'/>    <address type='pci' domain='0x0000' bus='0x02' slot='0x10' function='0x0'/>  </forward></network>

I am trying to add VLAN 100 to this network. If I use the following command toadd a VLAN tag to this network:
virsh net-update GE0-0-SRIOV-1 modify bridge --xml "<vlan trunk='no'><tag id='100'/></vlan>"

It fails as the section "bridge" doesn't support adding a VLAN tag. I have triedother section values like domain and all of them fail.
I am able to add the VLAN to the portgroup section, but then the VLAN configurationis not propagated to the underlying physical PF interface.
If I manually add the VLAN configuration using the "virsh net-edit" command andthen connect a VM to this network, then the VLAN information is correctly propagatedto the underlying physical NIC device. I need a way to automate this configuration.
Any pointers?
Thanks,Yegappan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20180711/531f68a5/attachment.htm>


More information about the libvirt-users mailing list