7

Building ovs

Embed Size (px)

Citation preview

Page 1: Building ovs
Page 2: Building ovs

Outline

● Procedure

● Trouble shooting

Page 3: Building ovs

Procedure● Download the tarball package

● Under the Linux (RHEL 6/CentOS 6), make sure needed tools (automake, cmake, rpmbuild...etc.) are installed

● Create folder “rpmbuild/SOURCES” and put the tarball package into the folder

● Extract the tarball package of OVS

● Enter the extracted folder of OVS

● Enter the folder “rhel” to build OVS RPM package:

– rpmbuild -bb openvswitch.spec

● After building the OVS package, start building kernel module:

– rpmbuild -bb openvswitch-kmod-rhel6.spec

● In the rpmbuild/RPM/x86_64 folder, we'll get bulit packages

Page 4: Building ovs

Trouble shooting

● During building the kernel module, the process would be failed due to lack of adding some setting

● Solution: add the needed folder in the openvswitch-kmod-rhel6.spec:

%files

/etc/*

/lib/*– And then re-issue the command again

● If build RPM form gitHub's latest packages:– In the openvswitch folder, issue :

./boot.sh → ./configure → make dist → rpmbuild -bb rhel/<specfile>

Page 5: Building ovs

Setup OVS bridge under the RHEL/CentOS 6

● Install the OVS packages and start “openvswitch” service● Disable the service : NetworkManager● In the /etc/sysconfig/network-scripts/ :

– If we choose eth0 as the OVS port –● Change ifcfg-eth0:

# Design for OVS bridge -- physical interface

DEVICE="eth0"

NAME="eth0"

ONBOOT="yes"

NETBOOT="yes"

IPV6INIT="no"

HWADDR="AA:BB:CC:DD:EE:FF"

TYPE="OVSPort"

DEVICETYPE="ovs"

NM_CONTROLLED="no"

OVS_BRIDGE="ovsbr0"

BRIDGE="ovsbr0"

Page 6: Building ovs

Setup OVS bridge under the RHEL/CentOS 6● Add new interface “ovsbr0” in the new file “ifcfg-

ovsbr0”:

# For OVS bridge to eth0

TYPE="OVSBridge"

NAME="ovsbr0"

DEVICE="ovsbr0"

ONBOOT="yes"

BOOTPROTO="none"

DEVICETYPE="ovs"

HOTPLUG="no"

USERCTL="no"

IPADDR="192.168.130.1"

PREFIX="24"

● Users need to restart the service “network”

Page 7: Building ovs

Thanks for your attention