Skip to content

Commit a8fcc4f

Browse files
committed
Summary: Add documentation for the KVM support for OpenVswitch
Modified the KVM installation instructions with an example on how to use the openvswitch bridges. Modified the Nicira NVP plugin documentation with support for KVM Updated the Nicira NVP docs to mention that it can be configured using the UI now.
1 parent 2d69a18 commit a8fcc4f

9 files changed

Lines changed: 167 additions & 6 deletions

docs/en-US/host-add-xenserver-kvm-ovm.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@
8383
<para>Make sure the new host has the same network configuration (guest, private, and
8484
public network) as other hosts in the cluster.</para>
8585
</listitem>
86+
<listitem>
87+
<para>If you are using OpenVswitch bridges edit the file agent.properties on the KVM host
88+
and set the parameter <emphasis role="italic">network.bridge.type</emphasis> to
89+
<emphasis role="italic">openvswitch</emphasis> before adding the host to &PRODUCT;</para>
90+
</listitem>
8691
</itemizedlist>
8792
</section>
8893
<!-- <section>
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<?xml version='1.0' encoding='utf-8' ?>
2+
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
3+
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
4+
%BOOK_ENTITIES;
5+
]>
6+
7+
<!-- Licensed to the Apache Software Foundation (ASF) under one
8+
or more contributor license agreements. See the NOTICE file
9+
distributed with this work for additional information
10+
regarding copyright ownership. The ASF licenses this file
11+
to you under the Apache License, Version 2.0 (the
12+
"License"); you may not use this file except in compliance
13+
with the License. You may obtain a copy of the License at
14+
15+
http://www.apache.org/licenses/LICENSE-2.0
16+
17+
Unless required by applicable law or agreed to in writing,
18+
software distributed under the License is distributed on an
19+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20+
KIND, either express or implied. See the License for the
21+
specific language governing permissions and limitations
22+
under the License.
23+
-->
24+
25+
<section id="hypervisor-host-install-network-openvswitch">
26+
<title>Configure the network using OpenVswitch</title>
27+
<warning><para>This is a very important section, please make sure you read this thoroughly.</para></warning>
28+
<para>In order to forward traffic to your instances you will need at least two bridges: <emphasis>public</emphasis> and <emphasis>private</emphasis>.</para>
29+
<para>By default these bridges are called <emphasis>cloudbr0</emphasis> and <emphasis>cloudbr1</emphasis>, but you do have to make sure they are available on each hypervisor.</para>
30+
<para>The most important factor is that you keep the configuration consistent on all your hypervisors.</para>
31+
<section id="hypervisor-host-install-network-openvswitch-prepare">
32+
<title>Preparing</title>
33+
<para>To make sure that the native bridge module will not interfere with openvswitch the bridge module should be added to the blacklist. See the modprobe documentation for your distribution on where to find the blacklist. Make sure the module is not loaded either by rebooting or executing rmmod bridge before executing next steps.</para>
34+
<para>The network configurations below depend on the ifup-ovs and ifdown-ovs scripts which are part of the openvswitch installation. They should be installed in /etc/sysconfig/network-scripts/</para>
35+
</section>
36+
<section id="hypervisor-host-install-network-openvswitch-vlan">
37+
<title>Network example</title>
38+
<para>There are many ways to configure your network. In the Basic networking mode you should have two (V)LAN's, one for your private network and one for the public network.</para>
39+
<para>We assume that the hypervisor has one NIC (eth0) with three tagged VLAN's:</para>
40+
<orderedlist>
41+
<listitem><para>VLAN 100 for management of the hypervisor</para></listitem>
42+
<listitem><para>VLAN 200 for public network of the instances (cloudbr0)</para></listitem>
43+
<listitem><para>VLAN 300 for private network of the instances (cloudbr1)</para></listitem>
44+
</orderedlist>
45+
<para>On VLAN 100 we give the Hypervisor the IP-Address 192.168.42.11/24 with the gateway 192.168.42.1</para>
46+
<note><para>The Hypervisor and Management server don't have to be in the same subnet!</para></note>
47+
</section>
48+
<section id="hypervisor-host-install-network-openvswitch-configure">
49+
<title>Configuring the network bridges</title>
50+
<para>It depends on the distribution you are using how to configure these, below you'll find
51+
examples for RHEL/CentOS.</para>
52+
<note><para>The goal is to have three bridges called 'mgmt0', 'cloudbr0' and 'cloudbr1' after this
53+
section. This should be used as a guideline only. The exact configuration will
54+
depend on your network layout.</para></note>
55+
<section id="hypervisor-host-install-network-openvswitch-configure-ovs">
56+
<title>Configure OpenVswitch</title>
57+
<para>The network interfaces using OpenVswitch are created using the ovs-vsctl command. This command will configure the interfaces and persist them to the OpenVswitch database.</para>
58+
<para>First we create a main bridge connected to the eth0 interface. Next we create three fake bridges, each connected to a specific vlan tag.</para>
59+
<programlisting><![CDATA[# ovs-vsctl add-br cloudbr
60+
# ovs-vsctl add-port cloudbr eth0
61+
# ovs-vsctl set port cloudbr trunks=100,200,300
62+
# ovs-vsctl add-br mgmt0 cloudbr 100
63+
# ovs-vsctl add-br cloudbr0 cloudbr 200
64+
# ovs-vsctl add-br cloudbr1 cloudbr 300]]></programlisting>
65+
</section>
66+
<section id="hypervisor-host-install-network-openvswitch-configure-rhel">
67+
<title>Configure in RHEL or CentOS</title>
68+
<para>The required packages were installed when openvswitch and libvirt were installed,
69+
we can proceed to configuring the network.</para>
70+
<para>First we configure eth0</para>
71+
<programlisting language="Bash">vi /etc/sysconfig/network-scripts/ifcfg-eth0</programlisting>
72+
<para>Make sure it looks similair to:</para>
73+
<programlisting><![CDATA[DEVICE=eth0
74+
HWADDR=00:04:xx:xx:xx:xx
75+
ONBOOT=yes
76+
HOTPLUG=no
77+
BOOTPROTO=none
78+
TYPE=Ethernet]]></programlisting>
79+
<para>We have to configure the base bridge with the trunk.</para>
80+
<programlisting language="Bash">vi /etc/sysconfig/network-scripts/ifcfg-cloudbr</programlisting>
81+
<programlisting><![CDATA[DEVICE=cloudbr
82+
ONBOOT=yes
83+
HOTPLUG=no
84+
BOOTPROTO=none
85+
DEVICETYPE=ovs
86+
TYPE=OVSBridge]]></programlisting>
87+
<para>We now have to configure the three VLAN bridges:</para>
88+
<programlisting language="Bash">vi /etc/sysconfig/network-scripts/ifcfg-mgmt0</programlisting>
89+
<programlisting><![CDATA[DEVICE=mgmt0
90+
ONBOOT=yes
91+
HOTPLUG=no
92+
BOOTPROTO=static
93+
DEVICETYPE=ovs
94+
TYPE=OVSBridge
95+
IPADDR=192.168.42.11
96+
GATEWAY=192.168.42.1
97+
NETMASK=255.255.255.0]]></programlisting>
98+
<programlisting language="Bash">vi /etc/sysconfig/network-scripts/ifcfg-cloudbr0</programlisting>
99+
<programlisting><![CDATA[DEVICE=cloudbr0
100+
ONBOOT=yes
101+
HOTPLUG=no
102+
BOOTPROTO=none
103+
DEVICETYPE=ovs
104+
TYPE=OVSBridge]]></programlisting>
105+
<programlisting language="Bash">vi /etc/sysconfig/network-scripts/ifcfg-cloudbr1</programlisting>
106+
<programlisting><![CDATA[DEVICE=cloudbr1
107+
ONBOOT=yes
108+
HOTPLUG=no
109+
BOOTPROTO=none
110+
TYPE=OVSBridge
111+
DEVICETYPE=ovs]]></programlisting>
112+
<para>With this configuration you should be able to restart the network, although a reboot is recommended to see if everything works properly.</para>
113+
<warning><para>Make sure you have an alternative way like IPMI or ILO to reach the machine in case you made a configuration error and the network stops functioning!</para></warning>
114+
</section>
115+
</section>
116+
</section>

docs/en-US/hypervisor-host-install-network.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<section id="hypervisor-host-install-network">
2626
<title>Configure the network bridges</title>
2727
<warning><para>This is a very important section, please make sure you read this thoroughly.</para></warning>
28+
<note><para>This section details how to configure bridges using the native implementation in Linux. Please refer to the next section if you intend to use OpenVswitch</para></note>
2829
<para>In order to forward traffic to your instances you will need at least two bridges: <emphasis>public</emphasis> and <emphasis>private</emphasis>.</para>
2930
<para>By default these bridges are called <emphasis>cloudbr0</emphasis> and <emphasis>cloudbr1</emphasis>, but you do have to make sure they are available on each hypervisor.</para>
3031
<para>The most important factor is that you keep the configuration consistent on all your hypervisors.</para>
@@ -146,4 +147,4 @@ iface cloudbr1 inet manual
146147
<warning><para>Make sure you have an alternative way like IPMI or ILO to reach the machine in case you made a configuration error and the network stops functioning!</para></warning>
147148
</section>
148149
</section>
149-
</section>
150+
</section>

docs/en-US/hypervisor-kvm-install-flow.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8' ?>
2-
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
2+
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
33
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
44
%BOOK_ENTITIES;
55
]>
@@ -31,6 +31,7 @@
3131
<xi:include href="hypervisor-host-install-libvirt.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
3232
<xi:include href="hypervisor-host-install-security-policies.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
3333
<xi:include href="hypervisor-host-install-network.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
34+
<xi:include href="hypervisor-host-install-network-openvswitch.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
3435
<xi:include href="hypervisor-host-install-firewall.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
3536
<xi:include href="hypervisor-host-install-finish.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
3637
</section>

docs/en-US/hypervisor-kvm-requirements.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8' ?>
2-
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
2+
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
33
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
44
%BOOK_ENTITIES;
55
]>
@@ -35,6 +35,11 @@
3535
<listitem><para>libvirt: 0.9.4 or higher</para></listitem>
3636
<listitem><para>Qemu/KVM: 1.0 or higher</para></listitem>
3737
</itemizedlist>
38+
<para>The default bridge in &PRODUCT; is the Linux native bridge implementation (bridge module). &PRODUCT; includes an option to work with OpenVswitch, the requirements are listed below</para>
39+
<itemizedlist>
40+
<listitem><para>libvirt: 0.9.11 or higher</para></listitem>
41+
<listitem><para>openvswitch: 1.7.1 or higher</para></listitem>
42+
</itemizedlist>
3843
<para>In addition, the following hardware requirements apply:</para>
3944
<itemizedlist>
4045
<listitem><para>Within a single cluster, the hosts must be of the same distribution version.</para></listitem>

docs/en-US/plugin-niciranvp-features.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
<title>Features of the Nicira NVP Plugin</title>
2525
<para>In CloudStack release 4.0.0-incubating this plugin supports the Connectivity service. This service is responsible for creating Layer 2 networks supporting the networks created by Guests. In other words when an tennant creates a new network, instead of the traditional VLAN a logical network will be created by sending the appropriate calls to the Nicira NVP Controller.</para>
2626
<para>The plugin has been tested with Nicira NVP versions 2.1.0, 2.2.0 and 2.2.1</para>
27-
<note><para>In CloudStack 4.0.0-incubating only the XenServer hypervisor is supported for use in combination with Nicira NVP</para></note>
28-
<note><para>In CloudStack 4.0.0-incubating the UI components for this plugin are not complete, configuration is done by sending commands to the API</para></note>
27+
<note><para>In CloudStack 4.0.0-incubating only the XenServer hypervisor is supported for use in
28+
combination with Nicira NVP.</para>
29+
<para>In CloudStack 4.1.0-incubating both KVM and XenServer hypervisors are
30+
supported.</para></note>
31+
<note><para>In CloudStack 4.0.0-incubating the UI components for this plugin are not complete,
32+
configuration is done by sending commands to the API.</para></note>
2933
</section>

docs/en-US/plugin-niciranvp-preparations.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
<title>Prerequisites</title>
2525
<para>Before enabling the Nicira NVP plugin the NVP Controller needs to be configured. Please review the NVP User Guide on how to do that. </para>
2626
<para>CloudStack needs to have at least one physical network with the isolation method set to "STT". This network should be enabled for the Guest traffic type.</para>
27-
<note><para>The Guest traffic type should be configured with the traffic label that matches the name of the Integration Bridge on XenServer. See the Nicira NVP User Guide for more details on how to set this up in XenServer.</para></note>
27+
<note><para>The Guest traffic type should be configured with the traffic label that matches the name of
28+
the Integration Bridge on the hypervisor. See the Nicira NVP User Guide for more details
29+
on how to set this up in XenServer or KVM.</para></note>
2830
<para>Make sure you have the following information ready:</para>
2931
<itemizedlist>
3032
<listitem><para>The IP address of the NVP Controller</para></listitem>

docs/en-US/plugin-niciranvp-ui.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
3+
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
4+
%BOOK_ENTITIES;
5+
<!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod">
6+
%xinclude;
7+
]>
8+
<!-- Licensed to the Apache Software Foundation (ASF) under one
9+
or more contributor license agreements. See the NOTICE file
10+
distributed with this work for additional information
11+
regarding copyright ownership. The ASF licenses this file
12+
to you under the Apache License, Version 2.0 (the
13+
"License"); you may not use this file except in compliance
14+
with the License. You may obtain a copy of the License at
15+
http://www.apache.org/licenses/LICENSE-2.0.
16+
Unless required by applicable law or agreed to in writing,
17+
software distributed under the License is distributed on an
18+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19+
KIND, either express or implied. See the License for the
20+
specific language governing permissions and limitations
21+
under the License.
22+
-->
23+
<section id="plugin-niciranvp-ui">
24+
<title>Configuring the Nicira NVP plugin from the UI</title>
25+
<para>In CloudStack 4.1.0-incubating the Nicira NVP plugin and its resources can be configured in the infrastructure tab of the UI. Navigate to the physical network with STT isolation and configure the network elements. The NiciraNvp is listed here. <!-- TODO add screenshot --></para>
26+
</section>

docs/en-US/plugin-niciranvp-usage.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<title>Using the Nicira NVP Plugin</title>
2525

2626
<xi:include href="plugin-niciranvp-preparations.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
27+
<xi:include href="plugin-niciranvp-ui.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
2728
<xi:include href="plugin-niciranvp-provider.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
2829
<xi:include href="plugin-niciranvp-devicemanagement.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
2930
</chapter>

0 commit comments

Comments
 (0)