104 Virtual Machine

As of Fall 2020, we strongly recommend you use Docker. Instructions are available on the repository. If that doesn’t work for you, go ahead and follow these legacy instructions for setting up a VirtualBox VM.

Overview

The VM we provide is a customized Ubuntu LTS installation that comes with the most recent C++ compiler, libraries, and debuggers. You can install it on your laptop regardless of your operating system, and use it for the entire semester for labs and homework assignments. We will grade everything on this VM’s compiler version and environment so it is critical you check your code on this system before submitting. All C++ compilers are NOT the same. The code you write on Visual Studio or XCode (common Windows and Mac development environments) may not run the same way on another system.

Read This First

Installation Instructions

To run this virtual machine you will need to download Oracle VirtualBox. After installing VirtualBox, download and install the extension pack, available on the same downloads page.

Download the Virtual Machine

Next download the virtual machine image. We recommend using curl which is already installed on Mac and Linux machines. A Windows version is available here. curl is a command line utility to download files from the internet. Go to a folder where you want to download the file and start a command prompt or Terminal there. Then, run the command:

curl https://bytes.usc.edu/files/cs103/VM/StudentVM_Spring2018.ova -o student-vm.ova

Install the Virtual Machine

Start Virtual Box and choose File then Import. Select the Ubuntu Virtual Machine (student-vm.ova) you downloaded. Use the default import options. Now, ddjust the settings of your VM

Adjust the appropriate amount of base memory. Everything has to be in the green zone:

settings in green zone

Make sure the VM has at least 2 CPU cores allocated. You can adjust this later to get the best results.

core count

Turn 3D Acceleration ON.

3d acceleration

Now, click on the Course VM option that now appears in VirtualBox’s list and select Start/Run. This will start the VM and start logging you in. Answer yes or default answer to any dialog box that appears. If you encounter errors starting your VM go to the troubleshooting section and then resume these directions.

Finish Setup

Do’s and Don’ts

Troubleshooting

In this section, we briefly go over common problems with VirtualBox and Ubuntu.

Other Options

The virtual machine image is installed on all the Windows PC’s in the engineering computing center (SAL). Thus, if you absolutely can’t get the VM working on your laptop, you can use one of these computers. Follow the directions below:

  1. Boot to Windows (not Mac)
  2. Find the VirtualBox icon on the desktop and start the application (not Mac)
  3. Many of these machines already have the student-vm imported and ready to run so that you can just start the VM and use it
  4. If the student-vm is not already imported you may do so by clicking File..Import Appliance. Then click the browse folder icon to go find the .ova file. Browse to Computer..C:\CS VM\ and pick the latest .ova file
  5. Then click import.
  6. Once the appliance is imported you can start it and use it
  7. Checkout your git repository.
  8. Your files will not be saved from one session to the next, so please commit and push your repository files