CSCI 103 Fall 2017 Introduction to Programming

CSCI 103 Fall 2017: Introduction to Programming

Installing the Virtual Machine

If you are having trouble installing the Virtual Machine you should scroll down to the Other Options section

Read This First

Installation

Before the end of the first week, you should attempt to install the course Virtual Machine (VM) on your laptop. Course staff will be able to help you in case of any problems. Post questions/problems on Piazza first so we get a good report of problems encountered, though complex issues may require a visit to office hours.

In order to get started running the course software, there are two things to download.

    1. Install the Virtual Machine (VM) hosting software, Oracle VirtualBox. It's available at

      follow the link for whatever operating system you own (Windows or OS X). Then, install the Virtualbox software package using all the default options.

Next, download the course VM image, an "ova" file called student-vm_2017.ova. It's a very large file, between 2 and 3 gigabytes. It can take a long time; consider downloading from a wired connection, or overnight. You can access it through this link:

http://bytes.usc.edu/files/cs103/install/student-vm_2017.ova
    • If you have problems downloading it, see "Troubleshooting" item 1 below.

Next you can start actually importing and running the VM.

  1. Open the Oracle VirtualBox program.
  2. In the File menu, click "Import Appliance".
  3. Select the ova file you downloaded and hit "Next."
    • If the ova file download was incorrect or corrupt, you would encounter an error. Check that its size is around 3 gigabytes and see "Troubleshooting" item 1 below.
  4. The Appliance Settings should be okay by default. Hit "Import." This will take between 2 and 15 minutes typically.
  5. startSelect the VM and press Start (see picture, right).
  6. A new window should appear with the VM booting inside of it. That will take about a minute, depending on your machine.
  7. The VM will auto login. If you ever need to know it, the password for the student user is 'developer' (no quotes).

Congratulations! Your virtual machine is successfully running the Ubuntu operating system (a kind of Linux). Here are few things to try out.

Fine-Tuning

Troubleshooting

  1. If the "ova" file did not download with the right size,
    • you might have some network problems preventing a full download at once; or some browsers encounter an integer overflow bug downloading such a large file.
    • You can get around this using an FTP client, which will support resuming stopped downloads. For example you can download the FileZilla FTP client from
      https://filezilla-project.org/download.php?type=client. Use anonymous FTP (no username/password required) to bytes.usc.edu with port=21.
    • Once installed, connect to host "bytes.usc.edu" and inside the "cs103" folder, inside its "install" subfolder, download the ova file.
  2. If your internet connection in the VM is not working,
    • check that your actual machine has a connection!
    • before trying the next step, simply reboot your VM and see if it can connect. 95% of the time this does the trick
    • if the above has not worked: go to the Devices menu of VirtualBox, and click Network/Connect Network Adapter; then go back into that menu and Connect Network Adapter again; wait a few seconds and the problem will often resolve
    • otherwise, seek help from course staff
  3. If VirtualBox cannot start your VM after it is imported you may need to enable virtualization in your BIOS which can be accessed on Win8 or 10 through these steps. Look for the setting called "virtualization", "VT-x" or "AMD-V" and enable them.
    • For about 1% of students, the BIOS has no such option. Please bring your laptop to course staff for them to double-check this. We will issue you a different version of the VM.

For any other problems, see course staff.

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\student-vm.ova

    Then click import.

  5. Once the appliance is imported you can start it and use it
  6. Your files will not be saved from one session to the next, so please copy your files to your USB drive, Dropbox, etc.

FAQ

Q: Do we need to use the VM? Can I use my favorite other C++ compiler?

A: Yes and no. We will only grade your submission using the VM, thus we recommend using the VM for beginners (which is the majority of the class). This ensures that you use the exact same version as the course staff and graders. Warnings if you don't use the VM: The compiler errors or warnings you get on your own machine/compiler might not match ours. We will do our best to make sure you get lots of feedback when you submit code for assignments, but be aware that you might need to budget extra time before deadlines to fix these incompatibilities. You will have to figure out how to run a debugger and the valgrind tool on your own.

Q: Can I use a different text editor?

A: You can. However, sublime (subl at the command line) is a very good editor w/ syntax highlighting etc. So is gedit (gedit at the command line) Both are pinned to your launch bar in the VM. Warnings if you use a different editor: Configure it to use only space characters and not tab characters for indentation, this will make it easier for us to understand your indentation when we print your code for grading.