This repository has been archived by the owner. It is now read-only.

Building the Pyretic VM

coxjacob edited this page Jun 2, 2015 · 28 revisions

Instructions for creating a Pyretic VM from the Mininet VM using VirualBox

  1. Download the official Mininet VM (instructions tested using mininet-2.1.0p2-140718-ubuntu-14.04-server amd64 and i386 images)

  2. Follow instructions at through "Log in into VM"

  3. Install Python dependencies

      $ sudo apt-get install python-dev python-pip python-netaddr screen hping3 ml-lpt graphviz ruby1.9.1-dev libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev python-all python-all-dev python-all-dbg
      $ sudo pip install networkx bitarray netaddr ipaddr pytest ipdb sphinx pyparsing==1.5.7 yappi
      $ sudo gem install jekyll
  4. Patch asynchat Python dependency (addresses some, but not all, of the bugs in this library)

      $ wget
      $ sudo mv /usr/lib/python2.7/
      $ sudo chown root:root /usr/lib/python2.7/ 
  5. Install git subtree

      $ git clone
      $ pushd git/contrib/subtree/
      $ make
      $ mv git-subtree
      $ sudo install -m 755 git-subtree /usr/lib/git-core
      $ popd
      $ rm -rf git
  6. Clone the pyretic repository to your home directory

      $ cd ~   
      $ git clone
  7. Setup your environment variables EITHER by adding the following lines to end of .profile:

      export PATH=$PATH:$HOME/pyretic:$HOME/pox   
      export PYTHONPATH=$HOME/pyretic:$HOME/mininet:$HOME/pox

OR by replacing your .profile

     $ rm .profile
     $ wget         
     $ chmod g-w .profile         
  1. add my helpful .screenrc

      $ wget
  2. Prepare VM for export

      $ sudo cat /dev/zero > zero.fill; sudo sync; sleep 1; sudo sync; sudo rm -f zero.fill; sudo shutdown -h now

    NOTE: The above command will be interrupted when disk is full, the following output will be displayed: cat: write error: No space left on the device.

  3. Export as an ovf

SSH Interface Setup (for VirtualBox)

  1. Import OVF

  2. Boot

  3. Append

     # The host-only network interface
     auto eth1
     iface eth1 inet dhcp

to /etc/network/interfaces In some instances, VirtualBox might not name the interfaces starting from eth0, eth1, ... (instead, it appends a higher number after eth for the first interface). You can check this through ifconfig -a, and add the corresponding interface entry above.

  1. Reboot

     $ sudo reboot
  2. Continue with "SSH into VM"

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.