[libvirt] [RFC Incomplete Patch] Libvirt + Openvswitch
aatteka at nicira.com
Thu Feb 2 14:30:51 UTC 2012
Libvirt has a function virNetDevBridgeRemovePort() which can
remove port from the Linux Bridge, but it seems that no one calls it.
Wanted to confirm if port removal happens automatically for Linux
Bridges if VM goes down? The difference between OVS and
Linux Bridge is that OVS will need a hook that removes all ports on
VM shutdown event (and maybe also for some other events?).
On Tue, Jan 31, 2012 at 9:26 PM, Laine Stump <laine at laine.org> wrote:
> On 01/31/2012 06:57 AM, Daniel P. Berrange wrote:
>> On Fri, Jan 27, 2012 at 02:58:58AM -0800, Dan Wendlandt wrote:
>>> Hello all,
>>> I know of many people who want to spin up VMs using libvirt + kvm/qemu
>>> attach those VMs to an openvswitch bridge (see:
>>> However, the only way I know of to get this working is a kludge that
>>> to tap devices along with<interface type="ethernet"> while running
>>> ovs-vsctl outside of libvirt. Even worse, doing this on RHEL/Fedora
>>> to require privilege tweaks (e.g., running qemu as root, not dropping
>>> capabilities), which may not be acceptable for production deployments
>>> So I would like to start taking steps toward better libvirt/openvswitch
>>> integration. My initial step has the fairly limit goal of enabling
>>> kvm/qemu VM NICs to attach to an openvswitch bridge in much the same way
>>> NIC can already attached to the linux bridge. For example, specifying:
>>> <interface type="openvswitch">
>>> <source bridge="br0"/>
>>> <mac address="ca:fe:de;ad:be:ef"/>
>> IMHO we should not be introducing a new "type" for OpenVSwitch. Contrary
>> to common understanding, type='bridge' is not referring explicitly to
>> Linux software bridging. Rather it refers to the concept of bridging the
>> guest to the LAN at the network level, of which Linux software briding
>> is one possible impl. OpenVSwitch is another possible impl. Other
>> have different impls too of course.
>> If OpenVSwitch is available in the kernel, is there really any reason
>> to *not* use it ? ie, could we just have
>> <interface type="bridge">
>> <source bridge="br0"/>
>> <mac address="ca:fe:de;ad:be:ef"/>
>> and if we see that 'br0' is using OpenVSwitch, then libvirt can know
>> to just do the right thing.
> Of course! <facepalm/> If the code can tell that br0 is an openvswitch
> bridge rather than a linux host bridge, we don't even have to add
> type='openvswitch' to the <source> element!
> I definitely like this the best, too.
> That way every application that uses
>> libvirt today will automatically be able to take advantage of the
>> benefits OpenVSwitch brings without further work
> Except that an interfaceid is needed (or is that optional?)
> libvir-list mailing list
> libvir-list at redhat.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the libvir-list