Update: I’m updating this post with a few improvements and also changing the Open vSwitch version to 2.0.
—-
In a previous post, I provided some instructions on how to upgrade Open vSwitch in the Mininet VM. Since then, I have been doing the same in my VMs over and over and have slowly been optimizing the steps to do it. So lately, I tried to figure out how to actually do the upgrade by building Debian install packages to install Open vSwitch instead of building and installing binaries directly. The main advantage of building and installing deb packages is that you can easily upgrade over and over.
The next steps will be to upgrade the Open vSwitch that gets installed by Mininet, which in this case was Open vSwtich version 1.4.0. I want to upgrade it to 2.0.0. The following should be the cut and paste instructions for upgrading using built packages.
Remove old Open vSwtich:
sudo apt-get remove openvswitch-common openvswitch-datapath-dkms openvswitch-controller openvswitch-pki openvswitch-switch
Download the new Open vSwtich source tarball:
mkdir openvswitch
cd openvswitch
wget http://openvswitch.org/releases/openvswitch-2.0.0.tar.gz
tar zxvf openvswitch-2.0.0.tar.gz
cd openvswitch-2.0.0
Install all the dependencies that will be needed:
sudo apt-get update
sudo apt-get -y install build-essential fakeroot debhelper autoconf automake libssl-dev pkg-config bzip2 openssl python-all procps python-qt4 python-zopeinterface python-twisted-conch
Build the Debian packages:
DEB_BUILD_OPTIONS='parallel=2 nocheck' fakeroot debian/rules binary
Install the packages:
cd ..
sudo dpkg -i openvswitch-common*.deb openvswitch-datapath-dkms*.deb openvswitch-controller*.deb openvswitch-pki*.deb openvswitch-switch*.deb
Then do some post install steps to keep the Open vSwitch Controller from starting automatically on boot:
sudo /etc/init.d/openvswitch-controller stop
sudo update-rc.d openvswitch-controller disable
sudo /etc/init.d/openvswitch-switch start
That’s it. I feel better about these instructions because you can keep using the same steps over and over to upgrade to the latest version of Open vSwitch. You would only need to change the “Download” step to get the version you want.
This post ‘Another way to upgrade Open vSwitch in Mininet VM’ first appeared on https://gregorygee.wordpress.com/.