User Tools

Site Tools


16.410/13 Virtual Machine

VM Installation

  1. Install Virtual Box (use the latest version)
  2. Download the .ova virtual machine to your computer (link)
  3. Import the downloaded virtual machine to Virtual Box (double click the downloaded .ova file or select File→Import Appliance in Virtual Box)
  4. Accept the recommended appliance settings for CPU, memory etc (or change if you want if you know what you are doing) – this will take a couple of minutes. If this fail, it probably means that your download was corrupted. Download the VM again and try. You can also check the sha1 sum of the VM (posted above)
  5. Start the VM (double click the VM in Virtual Box)
  6. Update the 16.410 configuration (here)

VM User access

User name: student
password: student

The VM may ask you for the password when you run sudo commands or when the screensaver kicks in.

Update the 16.410 VM

The following command updates the data in your 16.410 VM. You will need to do this every time we release new problem sets or when instructed to do so (for example to install new software required for the course).

In the VM, open a terminal (double click the LXTerminal shortcut in the desktop) and run

sudo apt-get update
sudo update_intro_to_autonomy

(Note that this will take a while the first time…)

This will install the Python and Jupyter/IPython system (with all required dependencies) and put a shortcut in the desktop (16.410/413 PSets).

Using the Jupyter/IPython system in the VM

If you have followed all the previous steps, Jupyter/IPython should be running in the background already.

To start using the Jupyter notebook, all you need to do is double click on the “Jupyter Notebook” desktop shortcut (or alternatively, open Firefox and navigate to http://localhost:8888/).

You should see the following:

The directories shown there are the ones corresponding to the /home/student/jupyter folder.

For tips/documentation on how to use the Jupyter/IPython notebook, go here

Restarting Jupyter/IPython if it stops working

If, for some reason, Jupyter stops working, you can restart the service by executing the following commands:

service intro-to-autonomy-ipython-notebook stop
service intro-to-autonomy-ipython-notebook start

Alternatively, you can just restart the VM.

Opening a Python terminal

Although we'll be using the Jupyter/IPython notebook for most of our assignments, you may want to open a traditional Python terminal to test things.

Because we are using a virtualenv for the packages needed for the problem set, you can't just type python in the terminal to open a Python terminal. That will work, but you won't have access to the preinstalled python packages such as matplotlib, ipython and others.

To open a Python terminal with access to the installed packages, do the following:

  1. Open a terminal (double click on the LXTerminal shortcut)
  2. Enter the following in the terminal:
    source /opt/16.410-psets/bin/activate
  3. The terminal will now say (16.410-psets)student@defiant:~$, indicating that the virtualenv is loaded
  4. You can now open a terminal typing python, however I recommend that you use the enhanced IPython terminal, that provides TAB completion and other nice features. Type ipython to start the IPython terminal.
  5. You should be able to access all the installed packages from that terminal. Try importing the matplotlib package for example:
    import matplotlib

Installing the VM Guest Additions

The VirtualBox Guest Additions are useful to get things like shared clipboard and folders between the VM and your host OS working properly.

The VM Guest Additions should be already installed and thus, this step is not required. However, if you have problems, you can try reinstalling them with the following instructions:

  1. With the VM open, click on Devices → Install Guest Additions CD image (in the Virtual Box menu)
  2. Open the new folder that shows up with the terminal
    1. Open a terminal window using the “LXTerminal” shortcut in the desktop
    2. Navigate to the “Guest Additions” folder:
       cd /media/student/VBOXADDITIONS_5.0.4_102546 

      Note that the exact version numbers could be different. Write up up to the first letters of VBOX.. and use TAB to autocomplete.

    3. Run the LinuxAdditions program by executing
      sudo ./

      in the terminal. Remember that the password is 'student'

    4. Restart the VM to let changes take effect (VirtualBox Machine→Reset)
vm_documentation.txt · Last modified: 2016/09/06 14:19 by aytonb