While reading Michael White’s newsletter (a weekly digest regarding VMware technology that I find very useful and read regularly) a while back, I came to know a small emulator tool for SDN called MiniNet (http://mininet.github.com/). I got a little time to read and play with it over the weekend and though it’s worthwhile to share my experience here.
Download the Virtual Machine
Bothered by SLOW Web UI to manage vSphere? Want to manage ALL your VMware vCenters, AWS, Azure, Openstack, container behind a SINGLE pane of glass? Want to search, analyze, report, visualize VMs, hosts, networks, datastores, events as easily as Google the Web? Find out more about vSearch 3.0: the search engine for all your private and public clouds.
There are several options to set up the Mininet. I chose to download a virtual machine image which is around 1G in size. Format wise, there are 6 choices including OVF package that I downloaded. Because the OVF package cannot be opened in the free VMware Player, I had to download VMware OVF Tool to convert it to VMX. The command is pretty simple.
After the conversion, however, it still could not be opened in Player. It turned out that the virtual hardware version is 9 and the VMware Player I had (version 4) does not support version 9. After searching a command option to convert it to virtual hardware version 8 with no luck, I upgraded the VMware Player to version 5.0.1 build-894247. Everything else seemed to work fine afterwards.
As Carter Shanklin pointed out, the OVF is a mess. I think it can fixed by including OVF importing/exporting feature directly in the Player. Again, it may not be VMware’s priority because VMware Player is after all a free product. If you read this blog, you can avoid the trouble due to hardware version mismatch anyway.
Fixing X Window to Run WireShark
After the virtual machine started to run, just enter both username and password as “mininet”. The walkthrough document is pretty well written. But I did have one trouble to follow the step-by-step instruction there.
Somehow the WireShark could not run because the X Window issue. It turned out the X Window was not installed and configured in the VM. To MiniNet team’s credit, there is actually a wiki page explaining the problem starting “This is not a Mininet problem.”
The solution was to install the X windows with the following commands (I wish it’s included in the VM because it wouldn’t increase size much):
$ sudo apt-get install xinit flwm $ startx
After that, the VM screen is plain dark. Don’t panic. That is expected. You need to right click on it and create a new bash terminal as shown in the following. I intentionally got both bash window and Wireshark on the same screen for convenience. You can decide your own screen layout. After fixing the issue, I didn’t find Wireshark is used so I think it’s OK to run the rest of commands even without Wireshark – you may lose visibility to the packets though.
From the Mininet Shell window, you can type in the Mininet commands, Python scripts. The environment it emulates is a network with two hosts, one controller, and one switch as you can see from the screenshot. I am not going to repeat whatever documented in the walkthrough wiki page. It’s pretty straight-forward and easy to follow.
After this, I will look into the scripts and related APIs. The benefits of SDN are there only when you can build network applications on top of them. Stay tuned.