[download]: [VirtualBox]: https://www.virtualbox.org/ [VirtualBox-download]: https://www.virtualbox.org/wiki/Downloads

Due to issues we have experienced during previous semesters with consistent EWS availability, we have decided to roll our own virtual machine for development use in this class. Please note that though we do try our best to ensure that differences between the EWS environment and our virtual environment are minimal, you are still responsible for checking that your code functions as expected on an EWS machine before turning in. This VM does not exactly emulate the EWS environment, and does not inherently connect to the EWS environment. If you intend to do all of your work on EWS machines, it is recommended to be aware of the VM as backup should EWS go down, but you do not need the virtual environment.

Downloading the VM image and setting it up with VirtualBox

  1. Visit the [download page][download] and choose the appropriate image for your operating system. Ensure that if you run a 32-bit operating system, you choose the 32-bit VM. Please note that the image is over 1GB, and will take time to download.
  2. Download Oracle VirtualBox, and the VirtualBox extension pack from the following website: https://www.virtualbox.org/wiki/Downloads. (If you run a Linux-based host OS, try finding the relevant packages in your distribution’s offical repository.)
  3. Install VirtualBox with the default settings.
  4. When the image is finished downloading, open VirtualBox and go to File -> Import Appliance. Choose the downloaded OVA in the dialogue that appears. Hit Next, then Import. This may take a few seconds.
  5. When the import is complete, assuming there were no errors, you should see an open VirtualBox interface. Select the machine “UIUC CS2xx ##-bit VM”, where “##” is the architecture you selected. Hit the green arrow Start button.

Getting started in the virtual Linux environment

When you start the virtual machine you should be dropped right into the familiar-looking (XFCE) desktop environment. Things will probably work how you expect them to.

You are welcome to change the user/password defaults, or any others, if you wish.

Now you should follow the instructions on the Course Setup page to set up your Subversion repository on the virtual machine. Please make sure that, when using the virtual environment (or any machine) alongside another machine for coursework, you commit any changes you make on the other machine and run:

svn up

in your repository folder before you begin work, to pull any changes you made on a different machine from the remote repository. Otherwise, you will end up with conflicting versions, and potentially lost work. Make sure to commit and update frequently, particularly when switching machines.

Easy Access to EWS Over SSH

We strongly recommend sanity checking your code on EWS before submitting it. These instructions will help you do that:

We are going to generate an [SSH key] for the VM so you can log in to EWS without a password: [SSH key]: https://wiki.archlinux.org/index.php/SSH_keys

ssh-keygen -t rsa

You can choose to encrypt the resulting key file, but that probably defeats the purpose of not having to log in with a password (though there are other reasons why you’d want to use an SSH key besides no password login).

Next we need to put your SSH key on EWS with the following command (where NETID is your NetID):

ssh-copy-id NETID@linux.ews.illinois.edu

You will be prompted for your AD password.

To make it even more convenient, let’s setup an SSH alias for EWS. Open up the file ~/.ssh/config in the text editor of your choice and put the following in it (again where NETID is your NetID):

Host ews
    HostName linux.ews.illinois.edu
    User NETID

Save that file and close it. You should now be able to login to EWS with simply typing:

ssh ews

Troubleshooting

VT-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.

If you receive the above error, or on boot the virtual machine outputs “This kernel requires an x86_64 CPU, but only detected an i686 CPU…”, please check to ensure that your processor supports hardware virtualisation. It’s easiest to do this by googling “(your machine model) enable virtualisation”, or by checking your processor model on the respective (Intel or AMD) manufacturer’s website. Assuming your machine does support hardware virtualisation, you should boot into the BIOS menu and enable the virtualisation option. The manner in which one does this is not standardised across machines, so, again, the easiest way to get instructions is to google “(your machine model) bios setup”. Booting into the BIOS menu has been discouraged on many machines running Windows 8, so you might have to look a bit, but it is possible.

If your machine a.) is running a 32-bit processor (unlikely) or b.) does not support hardware virtualisation at all (also somewhat unlikely), you will have to use the 32-bit vm.

Error relaunching VirtualBox VM process: 5

Command line: ‘81954AF5-4D2F-31EB-A142-B7AF187A1C41-suplib-2ndchild’ --coment “UIUC CS2xx VM 64” --startvm d56b3712-3c7f-4f2c-afb0-bc2c2fa94e38 --no-startvm-errormsgbox’ (rc=-104)

This was a problem last semester and we don’t know if it’s been fixed yet, so if you receive the above error running Windows or any other error in this thread, check the version of VirtualBox you’re running. Last semester the current version of VirtualBox conflicted with some antivirus software packages, and the easiest solution is to downgrade your version of VirtualBox to v. 4.3.12. We recommend that you manually uninstall your current version of VirtualBox completely, and then install the downgraded version. Otherwise, you may have to manually install some of the VirtualBox 4.3.12 drivers, because the downgraded package may not overwrite some of the newer drivers.