Re: Attach libvirt guest to an existing openvswitch port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/13/2016 01:23 PM, Ivan Borodin wrote:
Good day gentlemen.
I am building a study project and trying to configure openvswitch vlans
outside libvirt by means of openvswitch itself.

Somehow with interface types 'bridge' and 'network', libvirt does attach
domain to the existing port specified in <target dev=''/>, wiping the
exixting settings and always deletes this port upon domain shutdown,
thus making me loose ovs configuration.

Could you, please, tell me how should I configure an interface

You can set the vlan tag for an interface plugged into an OVS switch with the <vlan> tag:

     <interface type='bridge'>
        <source bridge='ovsbr0'/>
        <virtualport type='openvswitch'>
           <parameters interfaceid='.....'/>
        <virtualport>
        <vlan>
             <tag id='42'/>
        </vlan>

http://www.libvirt.org/formatdomain.html#elementVlanTag

(if you want vlan trunking, you can use <vlan trunk='yes'>, and then can specify multiple <tag> subelements for which vlan tags you want to allow.)

If you want a simpler way to have all the guests on a particular switch use the same vlan tag, you can define a libvirt network that points to the OVS switch, set a vlan tag to be used for all guests connecting to that network, then define your guest's interface as <interface type='network'>, pointing to this new network definition. Details for that can be found at:

http://www.libvirt.org/formatnetwork.html

(search for "openvswitch" and "vlan").

  or
libvirt itself to avoid this libvirt's greedines.

libvirt 2.4.0

Thak you.
Ivan.

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users


_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users



[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux