Pre-Built OpenDaylight VM Images
OpenDaylight OpenStack Integration with DevStack on Fedora →
There are more images on the OpenDaylight web site:
OpenDaylight Downloads Page →
While there is still some uncertainty on the platform details of OpenDaylight, there isn’t uncertainty in my mind, where I will be devoting my time for the rest of the year. I put up a couple of Pre-Built OpenDaylight VM Image, made up of the two proposed bootstrap controllers and OpenFlow tools, on a couple of VM images. I split it into dev and ops images so anyone curious or having trouble getting things installed can pull these down. Very little if any Linux knowledge is required. Once the project consolidates, I will do the same with the VMs. This is not anything official from ODP. This is merely a VM that has two controller proposals. I think it is important for those interested in OpenDaylight and ideally, what direction the community collectively decides is necessary and flexible enough to fit as broad a community as possible, rather then niche hyper-scale networks.
OpenDaylight is run by the Linux foundation based off meritocracy rather then a handful of people. For what it is worth, this is a real life open source project, very much like OpenStack. Someone like myself, who doesn’t work for Google, MS, FBook etc, that hasn’t paid to join this, or other consortiums, yet still was able to push a commit to the project. Thus, my optimism and excitement. Take a look at both of the projects, wether ops or dev oriented, both are have had a lot of work put into them and hopefully will blend into a good base for everyone to begin contributing to. I am sure the TSC (Technical Steering Committee) would appreciate feedback from the community over the next few months from actual networking pros who get paid to design, build and operate networks.
Last note, don’t be shy about asking questions or looking to contribute. I tend to be especially on something as big as this. OSS is all about peer review, but thats a good thing, especially when its constructive. I have found the folks on this project to be incredibly nice, helpful and everything awesome about open source projects. Feel free to ping me for suggestions on Twitter or here, but seriously, this isn’t a bunch of terse belittling. The Listerv speaks for itself and is linked at the bottom of the post.
The VMs contains the following working components, along with a snapshot of any bugs from the time of pull. I probably recommend at least 1-2GB if memory since both bootstraps run in JVMs that love memory. I haven’t really tested them other on my laptop and what not, so there may be some huge problem I am missing. Drop me a comment if you notice one and I would very much appreciate it. I probably watch the ODP listserv closer then I do comments here, so probably best to throw questions over there. If nervous about posting that public I totally understand and will try and get back to you here. I am much less versed on the net-virt controller since I had only had Floodlight prior to last week. There will be plenty of bugs in coming months, but this is all brand new so be patient or chip in 🙂 You can update the code by pulling updates, or just deleting the code directory and re-cloning the repo with the instructions in the second part of this post:
- A working OpenDaylight bootstrap controller.
- Wireshark w/ OpenFlow dissector.
- Eclipse w/ working OpenDaylight bootstrap controller.
- VM running Ubuntu 12.10. Will be 12.10 with the next update in 2 weeks.
- Intructions for installing all of the software above.
- The only service running outside of the vanilla Ubuntu install is ssh daemon. To remove run “sudo apt-get purge openssh-server”. -VM is set to attach to the bridge your Nic is attached to rather then sharing the hosts NIC (PAT).
- DHCP is enabled on the VM.
Daylight VM Video
Next is a brief video of what the VM looks like to determine if worth downloading. Its a quick 1 minute video showing the Ops image. The Dev image has the same w/Eclipse installed.
Download Daylight VM
Both ODP and Wireshark are preinstalled on the guest VM image. The second section has instructions to install the software on another host.
There are two images to choose from. One is just to run ODP. The other is for hacking on OpenDaylight bootstraps with the Eclipse IDE.
- The ODP-VM-Ops.zip image contains both current bootstraps Wireshark + Dissector and instructions to start them both.
- The ODP-VM-Dev.zip image contains both bootstraps already built into Eclipse along with the controller, Wireshark + Dissector, both current bootstraps and instructions to start them both.
New VM images can be found at the following links. Please see the networkstatic link for video and OpenStack instructions.
OpenDaylight OpenStack Integration with DevStack on Fedora →
There are more images on the OpenDaylight web site:
OpenDaylight Downloads Page →
Virtual Machine Image Import
The images are in a .OVF format that should interop with about any hypervisor out there. I am leaving the how to below for *.Vmwarevm in case anyone needs it but I have changed the images to *.OVF.
- Vmware (Commercial – Easy) – If using VMware add a guest host and locate the existing virtual disk or just unzip and double-click the vmwarevm image file.
- VirtualBox (Free – Easyish) – Before importing the guest VM, you just need to convert the ODP-VM-Lab1.vmwarevm image into an OVF format to import into VirtualBox.
- Download VirtualBox at https://www.virtualbox.org/wiki/Downloads
- Download the VMware OVF Tool (Open Virtualization Format) http://www.vmware.com/support/developer/ovf/
- The tool is freeish other then having to register with Vmware or login.
1 2 3 |
ovftool original-disk.vmx new-disk.ovf |
For example:
1 2 3 |
ovftool ODP-VM-Lab1.vmx ODP-VM-Lab1.ovf |
Windows Example:
1 2 3 |
ovftool “C:\Users\NAME\Documents\Virtual Machines\Windows 7 x64\ODP-VM-Lab1.vmx” C:\ODP-VM-Lab1.ovf |
Mac OSX Example:
1 2 3 |
/Applications/"VMware Fusion.app"/Contents/Library/"VMware OVF Tool"/ovftool ODP-VM-Lab1.vmwarevm/ODP-VM-Lab1.vmx ./ODP-VM-Lab1.ovf |
After the conversion, delete the Manifest file created ‘ODP-VM-Lab1.mf’ to avoid a (VERR_MANIFEST_FILE_MISMATCH) error on import.
Once converted, Open VirtualBox -> File -> Import Appliance -> Find ODP-VM-xBox.ovf (or whatever you exported it to).
Adjust any of the resources (CPU, Mem, Nic) and click import.
KVM / Qemu Image Import
KVM (Free -Advanced) – KVM has native support for VMDK images. Look at the VMX config file for the following attributes:
scsi0:0.fileName, uuid.bios, ethernet0.generatedAddress
1 2 3 4 5 6 7 8 |
#Example: kvm -drive file=zimbra-000001.vmdk,boot=on \ -net nic,macaddr=00:0c:29:c3:93:b9 -net tap \ -uuid 564d3f3d-3280-5bf2-9431-21c9b2c393b9 or convert it with: kvm-img convert -O qcow2 zimbra-000001.vmdk zimbra.qcow2 |
ODP VM System Settings
Default VM account UID/password
- User ID: odp
- password: passwd
Change the root password type: “passwd odp” in the console. Enable logging in as the root UID to avoid having to type sudo with “sudo passwd root”. The “su” (super user) will allow you to login as root.
I recommend installing the guest OS tools whether using VirtualBox or VM Fusion for mem ballooning copy/paste etc. Typically just click in the Virtual Machine menu and choose install guest VM tools.
After installing the mini.iso image, you can add a fairly stripped down, but still functional Ubuntu Desktop (lightdm) GUI. To do so install the following binaries from repo (~500MB):
1 2 3 |
sudo apt-get install xorg xterm gdm ubuntu-desktop menu firefox gksu synaptic --no-install-recommends |
Starting OpenDaylight (ODP) Bootstrap #1
Start the controller with the following. After a few seconds the controller web UI will be available. To stop the controller, at the OSGI CLI type “quit”.
1 2 3 4 |
cd /home/odp/controller/opendaylight/distribution/opendaylight/target/distribution.opendaylight-0.1.0-SNAPSHOT-osgipackage/opendaylight ./run.sh |
Click hyperlink on the desktop or any browser that can reach the IP of the guest VM to http://<127.0.0.1 or the IP of the ctrl>:8080 There is a link on the desktop for Bootstrap #1. I didn’t see instructions for #2 on the wiki.
The ODP strap #1 web UI login is:
Username: admin
Passwork: admin
Operating OpenDaylight SDN Controller Platform (OSCP) Bootstrap #2
Start a copy of the Controller.
1 2 3 4 5 |
make start-sdnplatform or java -jar target/sdnplatform.jar |
To stop the controller:
1 2 3 |
make stop-sdnplatform |
Starting Wireshark For OpenFlow Packet Cpatures
If you want to run everything on another machine, ssh to the guest VM using “ssh -X ” (upper case) to X11 forwarding.
Double click the Wireshark icon on the desktop (run with sudo privs, ignore Lua error).
Capture -> Interfaces -> eth0. Then start the capture.
Type “of” (no parentheses as seen below) in the filter window to ignore all packets other then OpenFlow packets.
Using Mininet For OpenFlow Testing
I recommend using X11 forwarding to the mininet instance in order to forward Wireshark w/X11 over the SSH session. Just ssh to the running VM with “ssh -XY “. Then you can run Wireshark off Mininet and tap an individual host if you need more granular tshooting then just on the controller. Alternatively, ask your vendor for a switch with OpenFlow support.
- 1. Start the Mininet or physical switch.
- 2. If physical switch piont it at the running VMs IP addr.
- 3. If Mininet, start the mininet VM and from the CLI type:
- sudo mn –controller=remote –ip=<insert_controller_ip> —port=6633 (Spin up a simple two host network) More at mininet.org
Testing With Mininet
Download Mininet the OpenFlow Switch Emulator
The newest version of mininet has a different syntax:
1 2 3 |
sudo mn --mac --controller=remote -- --port=6633 |
A video using Mininet w/ODP
Follow this tutorial for configuring ODP Bootstrap #1.
OpenDaylight ODP Bootstrap #1 →
Follow this tutorial for configuring ODP Bootstrap #2.
OpenDaylight ODP (OSCP) Bootstrap #2 →
There will be more in coming weeks as functionality increases and projects merge or even better, submit your own to the wiki or your own blog to get linked from the wiki.
Section II. Installing the software on another machine
The rest of this section if for installing the software that is on the VM image in this repo. If you are just using that image, you don’t need to install any of this. Building out your own lab rig would be good experience for anyone unfamiliar with Linux or building software.
Installing a Hypervisor and Guest VM
Setting up a stripped down Ubuntu VM. Download the Minimal CD.
Ubuntu mini.iso – https://help.ubuntu.com/community/Installation/MinimalCD
A video of installing with VirtualBox can be found here:
Open vSwitch and OpenFlow Lab Preparation →
Installing OpenDaylight Controller Bootstrap #1
Once you have built the controller with Maven (mvm clean install). If the ./run.sh script is not in the target directory, then maven must not have built properly. FYI, you need Internet access to build bootstrap #1. If you have poor or congested Internet connection it could cause the maven build to fail. If the build fails, just delete the controller directory to eliminate that as a problem ( rm -rf controller/ ). Then download the controller again and run (mvn clean install).
In order to download and install on a Linux box, do the following. Since this is using JVM, it builds rather easily on any platform. Hmm platform agnostic..
1 2 3 4 5 6 7 8 9 10 11 12 |
apt-get update apt-get install maven git openjdk-7-jre openjdk-7-jdk git clone http://git.opendaylight.org/gerrit/p/controller.git cd controller/opendaylight/distribution/opendaylight/ mvn clean install cd target/distribution.opendaylight-0.1.0-SNAPSHOT-osgipackage/opendaylight export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-i386/ (add to ~/.bashrc for ENV persistency) #For 64-bit export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64/ ./run.sh |
OpenDaylight Maven Build Error
If your Maven build fails with a ” OutOfMemory: PermGen Space ” Re-run Maven using the -X switch to enable full debug logging. This is due to a memory leak somewhere in the Maven build and is being tracked as a bug.
1 2 3 4 5 6 7 8 |
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.15:integration-test (default) on project northbound.integrationtest: Execution default of goal org.apache.maven.plugins:maven-failsafe-plugin:2.15:integration-test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? [ERROR] Command was/bin/sh -c cd /Users/brent/Downloads/controller/opendaylight/northbound/integrationtest && /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/bin/java -jar /Users/brent/Downloads/controller/opendaylight/northbound/integrationtest/target/surefire/surefirebooter4405430530997069603.jar /Users/brent/Downloads/controller/opendaylight/northbound/integrationtest/target/surefire/surefire1749047358112582031tmp /Users/brent/Downloads/controller/opendaylight/northbound/integrationtest/target/surefire/surefire_66025253661421325818tmp 20:24:00.137 [http-bio-8080-exec-9] ERROR o.o.c.l.b.i.UncaughtExceptionHandler - Uncaught ExceptionHandler: java.lang.OutOfMemoryError: PermGen space 20:24:03.594 [Timer-2,ISPN,brents-MacBook-Pro-2-567] ERROR o.o.c.l.b.i.UncaughtExceptionHandler - Uncaught ExceptionHandler: java.lang.OutOfMemoryError: PermGen space |
In the meantime run the following instead of “mvn clean install” and it will skip the integration tests that seem to be the source of the GC leak. Also increase memory allocation for Maven.
1 2 3 4 |
MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" mvn clean install -DskipTests |
If you don’t feel like building the controller you can simply download the nightly build as follows.
1 2 3 4 5 6 |
Download the nightly build at: https://jenkins.opendaylight.org/controller/job/controller-nightly/lastSuccessfulBuild/artifact/opendaylight/distribution/opendaylight/target/ #Unzip ./run.sh |
maven : Depends: libwagon2-java (>= 2.2-2) but it is not going to be installed
### Error ###
% sudo apt-get install maven2
/*
The following packages have unmet dependencies:
maven : Depends: libwagon2-java (>= 2.2-2) but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).
*/
### Workaround – force the package install: ###
% sudo dpkg -i –force-all /var/cache/apt/archives/libwagon2-java_2.2-3+nmu1_all.deb
### Then try Maven2 again and it should install: ###
% sudo apt-get install maven2
Bug at Launchpad:
[SRU] 2.2-3+nmu1 upgrade fails on conflict with libwagon-java
https://bugs.launchpad.net/ubuntu/+source/wagon2/+bug/1171056
Installing OpenDaylight SDN Controller Platform (OSCP) Bootstrap #2
1 2 3 4 5 6 7 |
sudo apt-get install unzip python-dev python-virtualenv build-essential ant git openjdk-7-jdk git clone http://git.opendaylight.org/gerrit/p/net-virt-platform.git cd net-virt-platform/ ./setup.sh make |
Prepare the Bootstrap #2 CLI
1 2 3 4 |
source /home/odp/net-virt-platform/workspace/ve/bin/activate make stop-sdncon reset-cassandra start-sdncon |
Installing Wireshark and the OpenFlow dissector
1 2 3 4 5 6 7 8 9 10 11 |
apt-get update apt-get install wireshark-dev wireshark mercurial git scons hg clone https://bitbucket.org/barnstorm/of-dissector cd of-dissector/src alias sudo='sudo env WIRESHARK=/usr/include/wireshark/' sudo scons install #This creates a shared object (so) named openflow.so. #Move openflow.so to the Wireshark plugin directory. sudo mv /home/odp/.wireshark/plugins/openflow.so /usr/lib/wireshark/libwireshark2/plugins/ |
Start Wireshark, look in Help->About->Plugins tab. You should see openflow.so as a listed dissector.
Installing Eclipse For Bootstrap #1
Download Eclipse IDE for Java Developers:
Eclipse IDE for Java Developers
Once you unzip the tar, find the Eclipse icon in the root directory and double click it to run Eclipse. It will ask you to choose a worksapce. Locate the workspace for either of the bootstraps in the ODP user directory. To switch between proposed bootstraps, go to File-> Switch Workspace.
1 2 3 |
tar xvfz eclipse-jee-juno-SR2-linux-gtk-x86_64.tar.gz |
Instructions for importing Bootsrap #1 into Eclipse see:
https://wiki.opendaylight.org/view/OpenDaylight_Controller:Eclipse_CLI_Setup
Video for importing ODP Bootstrap #1 into Eclipse
Video for importing ODP Bootstrap #1 into Eclipse:
OpenDaylight Controller:Importing OpenDaylight Controller into Eclipse
I did this before I realized there were two bootstraps. As soon as time permits I will do the other proposed build. It doesn’t use the OSGI modular framework, so it is pretty simple.
https://wiki.opendaylight.org/view/OpenDaylight_Controller:Importing_OpenDaylight_Controller_into_Eclipse
For a Pull only Eclipse build the following will get you started.
- git clone http://git.opendaylight.org/gerrit/p/controller.git
- cd controller/opendaylight/distribution/opendaylight/
- From the CLI run -> mvn clean install (5-10 minutes and requires decent bandwidth. It is slightly sensitve to lame bandwidth like my DSL.)
- Open Eclipse and install m2e.
- Help -> Install software -> “work with” enter the URI http://download.eclipse.org/technology/m2e/releases
- Choose the latest m2e release v1.3x. next, next, yes, finish, restart, etc.
- Import ODP: File -> import -> Maven -> Existing Maven Project -> Find the ODP dir. Anywhere at the top of the git clone
- Eclipse will parse out the pom.xml files and present all builds (leave everything checked). There should be 0 errors at this point.
- Click finish. Eclipse will install Tycho and buildhelper automatically. Next, next, finish, except warning of non-signed SW. Eclipse will ask to restart again.
- If a new install you will get the welcome screen again, just close that. Next Maven will reconcile the project, watch the status bar in the bottom right. Avoid too much clicking around until it is done to avoid any issues.
- After the bottom right status gets to 100%. In the left window, drill down into distribution.opendaylight. Find opendaylight.assembleit.launch, right click on it -> run-as -> 1. assembleit.launch. Maven will again build the project for a few minutes. You will likely have some errors in the bottom window and can likely ignore them.
- If successful, the console will eventually return “[INFO] Build Seccesful”.
- You can now run the controller directly from Eclipse by right clicking on “opendaylight-application.launch” -> run-as -> oepndaylight-application. To stop the controller click the red square red stop button.
Importing ODP Bootstrap #2 into Eclipse
Instructions for importing Bootsrap #2 into Eclipse see:
https://wiki.opendaylight.org/view/OpenDaylight_SDN_Controller_Platform_(OSCP):Installation
In the netvirt directory:
1 2 3 |
make eclipse |
Import “sdnplatform” project into any eclipse workspace
Installing Open vSwitch as a Forwarding Element
OVS can be used much like mininet for integrating hosts, and is by many HW vendors.
1 2 3 4 5 |
apt-get install openvswitch-datapath-source bridge-utils module-assistant auto-install openvswitch-datapath apt-get install openvswitch-brcompat openvswitch-common openvswitch-controller |
Once installed, you can create a Open vSwitch bridge on the host, attach a physical interface to the bridge and attach it to the controller.
1 2 3 4 5 6 7 8 9 10 11 |
ovs-vsctl add-br br-int $ ovs-vsctl add-port br-int eth0 $ ifconfig eth0 0 #Zero out your eth0 interface and slap it on the bridge interface #(warning will clip you unless you script it) $ifconfig br-int 192.168.1.208 netmask 255.255.255.0 #Change your default route $route add default gw 192.168.1.1 br-int and $route del default gw 192.168.1.1 eth0 ovs-vsctl set-controller br-int tcp:192.168.1.208:6633 |
More on Open vSwitch in some other tutorials here, or a Python installer I wrote that will build some different options of KVM, Open vSwitch and various controllers. Leave out the controller option since ODP is the bees knees.
controller/opendaylight/distribution/opendaylight
Update OpenDaylight with Maven and Git
To update the OpenDaylight bootstraps, just pull the changed files from the repository and in the case of the Maven project rebuild it. If you are modifying code in Eclipse, you can just right click on the bundle, top level right click, run-as “maven build”. A popup window will appear and choose “opendaylight-assembleit-fast: clean install”. Eclipse will build that module assuming its not broken 🙂
1 2 3 4 5 6 7 |
## Update the clone with the latest files from the clone root directory. git pull controller/opendaylight/distribution/opendaylight ## Rebuild with Maven mvn clean install |
For the net-virt controller. It easier with just a “git pull” and “make” from the net-virt root directory.
Help Shape The Future
If you have the cycles, come contribute to the project. It is a great time to shape the direction of networking. This is one of those 15-20 year disruptions that come about that will take another decade+ to absorb. It doesn’t matter who you work for, who you know, what consortium you belong to or any other exclusion. I am happy to give you my humble advice on a good place to start or how to get up to speed to. You dont have to be a programmer to contribute. Lots of documentation and architectural frameworks need to be created so jump in! Even just learning about OpenFlow / SDN and sharing that with someone else is a contribution. Hopefully this can cut down on basic build problems to keep dev focused. I will update as ODP milestones make sense.
Feel free to contact me for information and be sure to join the OpenDaylight mailing lists to share and collaborate with others using SDN. For support using the projects check out the Bootstrap #2 net-virt-platform-users and Bootstrap #1 controller-users for help. There aren’t very many questions yet, but any questions get answered quickly.
Nice work. Need to download and test on a Brocade XMR. As soon as I get some time 🙁
Thanks Darren, hit me up on Skype IM or irc.freenode for a primer pal. Happy to bdump to kickstart you. Your detailed blogs would really be helpful for folks.
Darren writes a great blog at http://mellowd.co.uk/ccie/
Ttyl!
-Brent
Thanks for putting this together. I will dive right into this.
Cheers!
Sure thing Billy. Thanks for the comment. Will have updated images towards the end of next week w/ bug fixes and a couple of tweeks. I wasnt paying attention and installed Ubuntu 12.10, will swap it out with 13.04. Also going to add some other OF tools.
Respect,
-Brent
Great tutorial, I found working with the images so much easier than bootstrapping your own server.
Hi Brent!
Thanks for putting the VMs together that really saved me a lot of work especially as I am not a Linux pro. I was going to test the OSCP Network Virtualization module and wanted to start using the CLI but that’s where my problems began. Executing the cli.py script just brings me to a REST API failure and that’s it. I would highly appreciate it if you could add a short topic on how to get the CLI working in your tutorial or even better add it to the VM’s dektop.
Thanks again for your great work.
Cheers Heinz
Hey Heinz! Certainly will. Sorry thought I did in the README. In the meantime this should get you going. I will verify this week.
source ./workspace/ve/bin/activate
make stop-sdncon reset-cassandra start-sdncon
make start-sdnplatform
cli/cli.py
Great tutorial here on it:
https://wiki.opendaylight.org/view/OpenDaylight_SDN_Controller_Platform_(OSCP):Installation
Thanks and let me know how it goes!
-Brent
Thanks for the little hint the CLI is working like charm now.
Only thing I can’t get to work is the WebUi. It keeps saying “TemplateDoesNotExist: coreui/templates/showapp.html” 🙁
Any ideas on this?
Cheers Heinz
“For some reason I thought I had 13.04 but installed 12.10”
I think you meant 12.04 Precise?
Thanks,
RG
Doh, thanks Robertico, as soon as I get a breather this weekend or next I will get it on the latest everything.
Cheers,
-Brent
Hi Brent,
Many thanks for putting this together. I could not find a way to set a root password for ubuntu 12.10. Any help in this regard would be much appreciated.
Thanks,
Ramki
I’m unable to log into the machine, the username and password don’t seem to work.
Did you change something? Am I doing something wrong?
Hello Brent,
I have been trying to download the VM’S via paperboy.nysernet but the ftp connection to the ftp server eventually times out. Hence i am unable to download it .
Is there any way you can share the VM with me .
Hello Brent,
I tried building the opendaylight VM myself but i am unable to download the net-virt-platform in step 2 -Installing OpenDaylight SDN Controller Platform (OSCP) Bootstrap #2.
I tried downloading the net-virt-platform from http://git.opendaylight.org/gerrit/p/net-virt-platform.git but couldnt find the file on git.
Can you please help.
Hi there Dear, are you actually visiting this web page regularly,
if so after that you will without doubt
get good know-how.
This paragraph is truly a pleasant one it assists new net users, who are wishing in
favor of blogging.