Skip to content

Commit 8a98448

Browse files
author
Ansis Atteka
committed
documentation: Add INSTALL.Libvirt file
Add documentation on how to use OVS integration with the upcoming Libvirt 0.9.11 release. Signed-off-by: Ansis Atteka <aatteka@nicira.com>
1 parent 200940d commit 8a98448

3 files changed

Lines changed: 75 additions & 0 deletions

File tree

INSTALL.Libvirt

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
How to Use Open vSwitch with Libvirt
2+
====================================
3+
4+
This document describes how to use Open vSwitch with Libvirt 0.9.11 or
5+
later. The Open vSwitch support in Libvirt 0.9.11 eliminates the need to
6+
use OVS Linux Bridge compatibility layer (brcompatd) and interface up/down
7+
scripts. This document assumes that you followed INSTALL.Linux or installed
8+
Open vSwitch from distribution packaging such as a .deb or .rpm. The Open
9+
vSwitch support is included by default in Libvirt 0.9.11. Consult
10+
www.libvirt.org for instructions on how to build the latest Libvirt, if your
11+
Linux distribution by default comes with an older Libvirt release.
12+
13+
Limitations
14+
-----------
15+
Currently there is no Open vSwitch support for networks that are managed
16+
by libvirt (e.g. NAT). As of now, only bridged networks are supported (those
17+
where the user has to manually create the bridge).
18+
19+
Setup
20+
-----
21+
22+
First, create the Open vSwitch bridge by using the ovs-vsctl utility (this
23+
must be done with administrative privileges):
24+
25+
% ovs-vsctl add-br ovsbr
26+
27+
Once that is done, create a VM, if necessary, and edit its Domain XML file:
28+
29+
% virsh edit <vm>
30+
31+
Lookup in the Domain XML file the <interface> section. There should be one
32+
such XML section for each interface the VM has.
33+
34+
...
35+
<interface type='network'>
36+
<mac address='52:54:00:71:b1:b6'/>
37+
<source network='default'/>
38+
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
39+
</interface>
40+
...
41+
42+
And change it to something like this:
43+
44+
...
45+
<interface type='bridge'>
46+
<mac address='52:54:00:71:b1:b6'/>
47+
<source bridge='ovsbr'/>
48+
<virtualport type='openvswitch'/>
49+
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
50+
</interface>
51+
...
52+
53+
The interface type must be set to "bridge". The <source> XML element
54+
specifies to which bridge this interface will be attached to. The
55+
<virtualport> element indicates that the bridge in <source> element is an
56+
Open vSwitch bridge.
57+
58+
Then (re)start the VM and verify if the guest's vnet interface is attached to
59+
the ovsbr bridge.
60+
61+
% ovs-vsctl show
62+
63+
Troubleshooting
64+
---------------
65+
If the VM does not want to start, then try to run the libvirtd process either
66+
from the terminal, so that all errors are printed in console, or inspect
67+
Libvirt/Open vSwitch log files for possible root cause.
68+
69+
Bug Reporting
70+
-------------
71+
72+
Please report problems to bugs@openvswitch.org.

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ EXTRA_DIST = \
3434
CodingStyle \
3535
DESIGN \
3636
INSTALL.KVM \
37+
INSTALL.Libvirt \
3738
INSTALL.Linux \
3839
INSTALL.RHEL \
3940
INSTALL.SSL \

README

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ Linux host, read INSTALL.RHEL.
102102
To use Open vSwitch with KVM on Linux, read INSTALL.Linux, then
103103
INSTALL.KVM.
104104

105+
To use Open vSwitch with Libvirt, read INSTALL.Libvirt.
106+
105107
To install Open vSwitch without using a kernel module, read
106108
INSTALL.userspace.
107109

0 commit comments

Comments
 (0)