Continuing our exploration of the recently released OpenDaylight Hydrogen (read the first part of our research here), we would like to share another portion of it. Today we will be speaking about OpenDaylight Virtual Tenant Network (VTN) coordinator, which is “part of the network application, orchestration and services layer… [that] …uses OpenDaylight APIs (REST) to construct the virtual network in ODCs [OpenDaylight controllers]”.



We have noticed that there are several issues with Virtual Tenant Network Coordinator installation on Ubuntu 12.04. Since there isn’t any meaningful guide available yet, we are providing details on its installation from sources. Our work is primarily based on this guide, which is missing several key points specific to Ubuntu 12.04.


Create vanilla Ubuntu VM image, and install Oracle Java 7 development environment following these guidelines.

Build environment

Generic utilities for building Virtual Tenant Network coordinator:

                        sudo apt-get install pkg-config gcc make ant g++ maven git libboost-dev libcurl4-openssl-dev libssl-dev unixodbc-dev                    

PostgreSQL database:

                        sudo apt-get install  postgresql-9.1 postgresql-client-9.1 postgresql-client-common postgresql-contrib-9.1 odbc-postgresql                    

Ubuntu 12.04 provides a bit outdated libjson, and that’s why we need to install the newest version from sources on Github repo for json-c.

                        git clone
cd json-c

Minor changes need to be made to build it in this environment. In files test/modules/stub/restjsonutil/json_build_parse.hh and test/modules/stub/restjsonutil/json_type_util.hh





Now build and install it:

make install
sudo cp /usr/local/lib/pkgconfig/json-c.pc /usr/share/pkgconfig/

Install gtest-dev library:

                        sudo apt-get install cmake libgtest-dev
cp -R /usr/src/gtest gtest-work
cd gtest-work
cmake CMakeLists.txt
sudo cp *.a /usr/lib
cd ..
rm -rf gtest-work

Building the Virtual Tenant Network Coordinator

We are finally ready to build the VTN coordinator:

                        git clone
cd vtn/coordinator/
mvn -f dist/pom.xml package
sudo make install

To be able to run the Virtual Tenant Network Coordinator, we need to install Apache Tomcat:

                        cd ~
mkdir tomcat
cd tomcat

Configure Tomcat for VTN service:

                        sudo ln -s /usr/local/vtn/tomcat/webapps/vtn-webapi /usr/share/java/apache-tomcat-7.0.39/webapps/vtn-webapi
sudo vi /usr/share/java/apache-tomcat-7.0.39/conf/



sudo vi /usr/share/java/apache-tomcat-7.0.39/conf/server.xml

Add the following to <Server … </Server>:


Set up database. DB configuration script needs to be adjusted to Ubuntu 12.04 environment:

Modify /usr/local/vtn/sbin/db_setup:

                        diff db_setup
<               [ "$lp64" = "1" ] && for libdir in lib64 lib64/odbc x86_64-linux-gnu/odbc; do
>               [ "$lp64" = "1" ] && for libdir in lib64 lib64/odbc; do

Configure database:

                        sudo /usr/local/vtn/sbin/db_setup                    

Finally, Virtual Tenant Network Coordinator is ready for use and we can start it:

/usr/share/java/apache-tomcat-7.0.39/bin/ start

Make sure that OpenDaylight controller is started with VTN Manger component:

                        sudo odl-hyd-virt -virt vtn                    

Simple remote checks to make sure that it’s running (change VTN_COORD_IP to actual value):

                        curl -X GET -H 'content-type: application/json' -H 'username: admin' -H 'password: adminpass'   -H 'ipaddr:VTN_COORD_IP' http://8080/vtn-webapi/api_version.json                    

In order to terminate the Virtual Tenant Network coordinator:

                        /usr/share/java/apache-tomcat-7.0.39/bin/ stop

Future updates

Ubuntu 12.04 version will be supported through April 2017, so the presented solution will remain relevant at least until then. As you probably know, a new version of Ubuntu (14.04) is coming soon, and it is possible that this approach will work on it as well. We will update the post with information on Ubuntu 14.04 as soon as we have it available.

Update: 23/07/14

In order to compile and install VTN Coordinator under brand new Ubuntu 14.04, simply follow the instructions provided by the OpenDaylight Wiki page for Ubuntu 13.10. No special tricks required as with Ubuntu 12.04.