Installing OpenSwitch


First, disclaimer: I’m an HP employee. HP’s a major contributor to the OpenSwitch project. Just thought you should know in case you think that affects my opinion here.

If you need more info on the OpenSwitch project, you can check out the first post in this series here.

Getting our hands dirty

This section comes down into three steps, if you don’t follow these steps, you won’t succeed. I’m not going to go into details on these steps as I’m assuming you can figure this out if you found this blog. 🙂 

– Install Virtual Box

– Install Vagrant

– Install Docker Toolbox

I’m running OpenSwitch on a Windows box in this case as the documentation covers the ‘IX build. I’m running on this natively on OSX which also means that I’ve got to install the docker toolbox plugin to get docker containesr to work. I’m  also assuming that you’ve already installed Virtual Box and Vagrant for the following section.

Installing Vagrant Plugin

From a terminal window, run the vagrant plugin install vagrant-reload command from the CLI. This should show the following output.

Screen Shot 2015 10 20 at 8 28 45 PM

Installing the OpenSwitch Dev Environment

For this section, I’m assuming you have already downloaded the vagrant files from here into your working directory.

Running the Docker Toolbox Plugin

Run the Docker QuickStart Terminal application and wait for the virtual box image to come to a running state. You should be able to see the following 

Screen Shot 2015 10 20 at 8 30 50 PM

Vagrant up!

From the terminal, navigate to where you have unzipped the OpenSwitch vagrant files that you downloaded from here.  Run vagrant up command from the CLI. At this point some magic happens ( read more on Vagrant here if you’ve never worked with this tool before. Magic is obviously not magic, but I just don’t feel like explaining the whole process in this post. )


On a OSX box, you’re not running as root so you may end up with the following window

Screen Shot 2015 10 20 at 8 33 27 PM

If you hit this, don’t worry, just SUDO it! 

Screen Shot 2015 10 20 at 8 36 39 PM

 Accessing the OpenSwitch

From the same terminal window issue the sudo vagrant ssh command to be able to access the shell (CLI) of the OpenSwitch. 


If you are successful, you should see the following output. Notice the shell has changed to vagrant@switch

Screen Shot 2015 10 20 at 8 39 21 PM

Accessing the network interface

From the vagrant@switch prompt, issue the sudo vtysh command and you will now have access to an industry standard hierarchical CLI like we all know and love!

Screen Shot 2015 10 20 at 8 41 36 PM

 My thoughts so far

Getting this up and running has been relatively painless. There were a couple of small things to get it running that were particular to OSX which was not covered on the OpenSwitch quick start guide. Nothing that a little patience and google didn’t help me cover in a few minutes though.  The install experience was pretty easy.  The guides were pretty accurate and the getting this up and running should be something most of us can follow without much trouble.

OpenSwitch doesn’t have what I would call a robust network stack at this point in time, but we’re still really early in this world.  Now that I’ve got it up and running, I’m looking forward to starting to look at the alternate interfaces such as OVSDB and REST as described here

Anyone else got this up and running yet? Thoughts? Let me know in the comments below!




7 thoughts on “Installing OpenSwitch

  1. Hey Chris,

    On Windows, the command prompt or other terminal/shell program used (I use Babun) must be ‘Run as Administrator’ or failures occur with copious Ruby level output.

    I also faced network related issues, with errors around vagrant being unable to find the new Host Only adapter it creates (and it does create it). In the end I had to add a line (and a comma at the end of the proceeding one) like so in the …/host/Vagrantfile: “private_network”, type: “dhcp”,
    virtualbox__intnet: “openswitch”

    Virtualbox automatically creates the internal network specified (openswitch).

    A few failed vagrant up attempts later (probably due to apt-get install issues) it finally worked.

    Oddly I don’t see a VM running in VirtualBox (although one called ops-host was created initially).

    • Hey Steve,

      Thanks for the comments. I’ll give this a go on wi cows and see how it comes out. My only windows box has a corporate build on it, so it’s less than reliable with e host based firewall and IPS. Leads to some interesting problems which I’d rather not deal with. 🙂

      Might have to spin up a VM to test.


  2. It would be nice if I could just run this as a Docker container rather than get the whole ‘development environment’ but I well understand the reasons it is that way right now. If you know of an easy way, do let me know. I’ve got the Docker base image (via a pull of openswitch/genericx86-64) but can’t get it to start, will dig some more.

    • Thanks! It’s definitely an interesting project.

      The documentation is definitely one place in the project that could use some work. I don’t think my coding skills are good enough yet to contribute to the project in lines of code, but I’m hoping to take a crack at helping to improve some of the docs while I continue on this journey.

      I know there’s a Docker image that uses mininet, but I didn’t see the docs for it on the website. I would suggest either hitting up the IRC channel or the mailing list to see if someone on the development team can put some rough docs together?

      Hoping to spend some additional time next week again with OpenSwitch. If the day job allows me the time I’m hoping for another couple of posts.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s