]> xenbits.xensource.com Git - libvirt.git/commit
network: support Open vSwitch
authorAnsis Atteka <aatteka@nicira.com>
Fri, 10 Feb 2012 21:09:00 +0000 (23:09 +0200)
committerLaine Stump <laine@laine.org>
Wed, 15 Feb 2012 21:04:54 +0000 (16:04 -0500)
commitdf8100463272c3c9a7a680d547b675ec277ed53e
tree52c55f0c1c0cdf13157b80d7c0ca95e7fc274b90
parent9368465f7558a31e1d0d49193b45afd13fd2e023
network: support Open vSwitch

This patch allows libvirt to add interfaces to already
existing Open vSwitch bridges. The following syntax in
domain XML file can be used:

    <interface type='bridge'>
      <mac address='52:54:00:d0:3f:f2'/>
      <source bridge='ovsbr'/>
      <virtualport type='openvswitch'>
        <parameters interfaceid='921a80cd-e6de-5a2e-db9c-ab27f15a6e1d'/>
      </virtualport>
      <address type='pci' domain='0x0000' bus='0x00'
                          slot='0x03' function='0x0'/>
    </interface>

or if libvirt should auto-generate the interfaceid use
following syntax:

    <interface type='bridge'>
      <mac address='52:54:00:d0:3f:f2'/>
      <source bridge='ovsbr'/>
      <virtualport type='openvswitch'>
      </virtualport>
      <address type='pci' domain='0x0000' bus='0x00'
                          slot='0x03' function='0x0'/>
    </interface>

It is also possible to pass an optional profileid. To do that
use following syntax:

   <interface type='bridge'>
     <source bridge='ovsbr'/>
     <mac address='00:55:1a:65:a2:8d'/>
     <virtualport type='openvswitch'>
       <parameters interfaceid='921a80cd-e6de-5a2e-db9c-ab27f15a6e1d'
                   profileid='test-profile'/>
     </virtualport>
   </interface>

To create Open vSwitch bridge install Open vSwitch and
run the following command:

    ovs-vsctl add-br ovsbr
20 files changed:
AUTHORS
configure.ac
po/POTFILES.in
src/Makefile.am
src/conf/domain_conf.c
src/conf/domain_conf.h
src/conf/netdev_vport_profile_conf.c
src/libvirt_private.syms
src/lxc/lxc_driver.c
src/network/bridge_driver.c
src/qemu/qemu_command.c
src/qemu/qemu_hotplug.c
src/qemu/qemu_process.c
src/uml/uml_conf.c
src/util/virnetdevopenvswitch.c [new file with mode: 0644]
src/util/virnetdevopenvswitch.h [new file with mode: 0644]
src/util/virnetdevtap.c
src/util/virnetdevtap.h
src/util/virnetdevvportprofile.c
src/util/virnetdevvportprofile.h