Setting up your CS144 VM using VirtualBox

This guide will walk you through setting up the provided VM image in VirtualBox.

Table of contents

  1. Prerequisites
  2. Set up the VM image
  3. Connect to your VM
  4. (optional) Set up a shared folder

Prerequisites

  1. Install VirtualBox.

    If your host OS is linux, your distribution may already package virtualbox:

  2. Download the VM image.

    This is a large file, so use a wired connection or sit close to an access point while downloading!

Set up the VM image

Start VirtualBox. You should see this:

VirtualBox home screen
VirtualBox home screen

Type Ctrl-I or click “File” -> “Import Appliance…” to bring up the import window. Type in or browse to the location of the cs144_vm.ova file you downloaded above.

Import Appliance dialog
Import Appliance dialog

The default settings are acceptable, but it’s better if you can increase the number of virtual CPUs and the amount of RAM available to your VM in order to increase performance.

Adjust the CPU and Memory settings if you’d like
Adjust the CPU and Memory settings if you’d like
Loading…
Loading…

Success! Back at the home screen, select your newly imported VM and hit the Start icon.

Ready to go
Ready to go

The VM will boot to a textual interface. Your username is cs144, and the default password is also cs144. However, you will be forced to change the password on first login. Please choose a strong password!

We recommend that you interact with your VM primarily using ssh and shared folders. However, if you’d prefer your VM to boot directly to a graphical interface in the future, after logging in run the following command:

sudo apt-get install --reinstall lightdm

To start a GUI now:

sudo systemctl start lightdm

Connect to your VM

The VM image is set up so that VirtualBox will forward TCP connections to localhost:2222 on the Host machine to port 22 (ssh) on the VM. When your VM is running, you should be able to connect as follows:

ssh -p 2222 cs144@localhost

For Windows users needing an SSH client, we recommend Putty.

(optional) Set up a shared folder

From the VirtualBox home screen, click Settings or type Ctrl-S, select “Shared Folders” in the column on the left, then click the “Add” button in the top-right corner.

Add a shared folder
Add a shared folder

Select a folder from the host machine to add. We recommend ticking “Auto-mount” to have it mounted automatically when your VM boots.

For example, to share /tmp
For example, to share /tmp

Auto-mounted folders will be available at /media/sf_<FolderName>, where where <FolderName> is the name you used in the Shared Folder dialog immediately above (in this example, <FolderName> would be tmp).

If you didn’t tick Auto-mount, you can still mount shared folders manually in your VM with:

sudo mkdir -p /media/sf_<FolderName>
sudo mount -t vboxsf -o rw,gid=vboxsf <FolderName> /media/sf_<FolderName>