VirtualBox Setup Tutorial

System Requirements

To properly run the provided Ubuntu image, we recommend the following at the minimum:

Overview

We will now set up the virtual machine for the class project. Roughly, you need to take the following steps.

  1. Download and install VirtualBox software
  2. Download and import CS246 virtual machine image
  3. Set up shared folder
  4. Power on and log into the virtual machine

Step 1: Install VirtualBox Software

  1. Download and install the VirtualBox software.
  2. Follow the screen instructions to complete the installation.

Step 2: Import Virtual Machine Image

  1. Download the CS246.ova file. This is the virtual machine image for the class project. Since it is a very large file, it will take a while to download.
  2. Verify the integrity of the downloaded file by checking its checksum:

    On OS X, you can run "shasum CS246.ova" to compute the SHA1 checksum of the downloaded file. On Windows, you can use this tool.

  3. Start VirtualBox.
  4. Once it starts, select "File > Import Appliance..." menu.
  5. Choose the downloaded CS246.ova file and click "Next".
  6. Keep the default setting and click "Import" button. *Important*: DO NOT select "Reinitialize the MAC address..." option.
  7. Wait until import finishes. Once it is done, you will see the following window.

Step 3: Setup Shared Folder

You now need to set up a shared folder to transfer files between your host machine and the virtual machine easily.
  1. Create a new folder, say "C:\Users\cho\vm-shared", on your machine. This folder will be used as the shared folder between the host machine and the virtual machine.
  2. Press "Settings" button on VirtualBox.
  3. Select "Shared Folders" and double click "vm-shared" in "Folders List".
  4. Fill in the following information in the dialog box
  5. Press "OK" buttons to close dialog boxes.
Now your shared folder is set up. From now on, the "C:\Users\cho\vm-shared" folder on your host machine is accessible at "/home/cs246/shared/" in your virtual machine. If you copy a file to "C:\Users\cho\vm-shared" on your host machine, you can access the file in your virtual machine at "/home/cs246/shared/" and vice versa.

Step 4: Start Virtual Machine and Login

  1. Press "Start" button on your VirtualBox. Once the system finishes booting up, you will see the following screen.
  2. Now you can login to the virtual machine using username: cs246 and password: password.

Note: If you use Windows, and you see just a black screen after your virtual machine boots up, you may fix the problem by taking the steps in our FAQ.

SSH login to Virtual Machine

If desired, you can login to the virtual machine at "localhost" port 2462 using a secure shell client from the host machine. This access method will make it easy to "cut-and-paste" some text from host to a file in your virtual machine, for example. On OS X, you can do it as follows: On Windows, you can use a secure shell client software, such as PuTTY.

Turning Off VirtualBox

To turn off your virtual machine, simply close the virtual machine terminal window. Then you will be prompted with 3 options.

For a reboot, type "sudo reboot" in the virtual machine terminal.

FAQ

  1. Q: My VM starts to boot up, but it ends up with a completely black screen. I do not see any login prompt. How can I fix it?

    A: It seems on some windows machine, your BIOS and windows setup does not enable the 64 bit mode support in a VM, which sometimes causes this problem (Our Ubuntu image is based on 64 bit OS). First check whether you indeed suffer from this issue by checking your guest "Operatiing System":

    If it says Ubuntu (32-bit) like the above screen capture, it may indicate that you suffering from this issue.

    To enable Ubuntu 64 bit VM on Windows, here is a possible solution (credit to Linzuo Li):

    1. Go to Windows features and make sure Hyper V is disabled
    2. To run both the host and VM in 64 bit, you need to enable a special support from the CPU. For example, for an Intel, go to BIOS settings and change the CPU configuration by enabling Intel Virtualization Technology.
    3. Go back to VirtualBox and change the OS to Ubuntu 64 bit.