How to correctly install OpenvSwitch on Ubuntu

Fax Online    Send article as PDF   

Installed on Ubuntu 12.04 and Ubuntu 12.04.2 as follows:

  • Install Open vSwitch:
apt-get install openvswitch-brcompat openvswitch-switch
  • Try to start Open vSwitch:
# /etc/init.d/openvswitch-switch restart
 * ovs-brcompatd is not running
 * Killing ovs-vswitchd (6011)
 * Killing ovsdb-server (6002)
 * Starting ovsdb-server
 * Configuring Open vSwitch system IDs
 * Starting ovs-vswitchd
 * Enabling gre with iptables
  • The results show brcompat not running:

sed -i 's/# BRCOMPAT=no/BRCOMPAT=yes/g' /etc/default/openvswitch-switch
  • Try to start again:
# /etc/init.d/openvswitch-switch restart
* ovs-brcompatd is not running
 * ovs-vswitchd is not running
 * ovsdb-server is not running
FATAL: Error inserting brcompat (/lib/modules/3.5.0-23-generic/updates/dkms/brcompat.ko): Unknown symbol in module, or unknown parameter (see dmesg)
 * Inserting brcompat module
Module has probably not been built for this kernel.
Install the openvswitch-datapath-source package, then read
/usr/share/doc/openvswitch-datapath-source/README.Debian
FATAL: Error inserting brcompat (/lib/modules/3.5.0-23-generic/updates/dkms/brcompat.ko): Unknown symbol in module, or unknown parameter (see dmesg)
 * Inserting brcompat module

This error message will appear in the Ubuntu-12.04.2 system to force the loading module:

# /etc/init.d/openvswitch-switch force-reload-kmod
FATAL: Error inserting brcompat (/lib/modules/3.5.0-23-generic/updates/dkms/brcompat.ko): Unknown symbol in module, or unknown parameter (see dmesg)
 * Inserting brcompat module
Module has probably not been built for this kernel.
Install the openvswitch-datapath-source package, then read
/usr/share/doc/openvswitch-datapath-source/README.Debian
Apr 20 17:10:50|00001|stream_unix|ERR|/tmp/stream-unix.10666.0: connection to /var/run/openvswitch/db.sock failed: No such file or directory
Apr 20 17:10:50|00002|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
Apr 20 17:10:51|00003|stream_unix|ERR|/tmp/stream-unix.10666.1: connection to /var/run/openvswitch/db.sock failed: No such file or directory
Apr 20 17:10:51|00004|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
Apr 20 17:10:53|00005|stream_unix|ERR|/tmp/stream-unix.10666.2: connection to /var/run/openvswitch/db.sock failed: No such file or directory
Apr 20 17:10:53|00006|reconnect|WARN|unix:/var/run/openvswitch/db.sock: connection attempt failed (No such file or directory)
Alarm clock
 * Detected internal interfaces:
 * ovs-brcompatd is not running
 * ovs-vswitchd is not running
 * ovsdb-server is not running
 * Saving interface configuration
 * Removing openvswitch module
 * Inserting openvswitch module
 * Inserting brcompat module
 * Starting ovsdb-server
 * Configuring Open vSwitch system IDs
 * Starting ovs-vswitchd
 * Starting ovs-brcompatd
 * Restoring interface configuration
 * iptables already has a rule for gre, not explicitly enabling
  • Now brcompat module normal load:
# lsmod | grep br
brcompat               13513  0 
openvswitch            84124  1 brcompat

Tested on Ubuntu-12.04 system installed directly basically no problem, if there is a problem on the use of force-reload-kmod.