Skip to content
This repository has been archived by the owner on Jun 27, 2018. It is now read-only.

Building the Pyretic VM

Joshua Reich edited this page Oct 9, 2013 · 28 revisions

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

  1. Download the official Mininet VM (or use your own Mininet VM)

  2. Import into Virtual Box, in "Settings->Basic" set "Name" appropriately 2a. Install Python dependencies

      $ sudo apt-get install python-dev python-pip screen
      $ sudo pip install networkx bitarray ipaddr pytest ipdb
    

2b. Patch asynchat Python dependency (addresses some, but not all, of the bugs in this library)

     $ wget http://frenetic-lang.org/pyretic/useful/asynchat.py
     $ sudo mv asynchat.py /usr/lib/python2.7/
     $ sudo chown root:root /usr/lib/python2.7/asynchat.py 
  1. Clone the pyretic repository to your home directory

      $ cd ~   
      $ git clone git://github.com/frenetic-lang/pyretic.git
    
  2. 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 http://frenetic-lang.org/pyretic/useful/.profile         
  1. add my helpful .screenrc

      $ wget http://frenetic-lang.org/pyretic/useful/.screenrc
    
  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
    
  3. Export as an ovf

Clone this wiki locally