Link Search Menu Expand Document

VirtualBox Setup

Vagrant is a cross-platform tool for managing virtual machines. You can use Vagrant to download and run the virtual machine image we have prepared for this course. The virtual machine for the course is different every term; do not use one from a previous semester.

Vagrant depends on providers for virtualization. The default provider is VirtualBox, an open-source virtualization product.

First, download and install the latest version of VirtualBox from the VirtualBox website. We recommend using the latest version of VirtualBox, as certain earlier versions of VirtualBox (6.0.0 - 6.0.4) may not properly boot our class VM. Alternatively, for some users, VirtualBox 5 is more stable than VirtualBox 6.

Next, download and install the latest version of Vagrant from the Vagrant website.

After Vagrant and VirtualBox are installed, type the following into your terminal to initialize your VM and begin an SSH session:

mkdir cs162-vm
cd cs162-vm
vagrant init cs162/fall2022
vagrant up
vagrant ssh

These commands will download our virtual machine image from our server and boot it. The download of the image will take a while, and requires an Internet connection.

From the cs162-vm directory you created earlier, you can run vagrant up to start the virtual machine, and vagrant halt to stop the virtual machine. To start an SSH session to the virtual machine, run vagrant ssh. You can run exit to exit an SSH session.