[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.
Remember to check your work on EWS before submitting your final revision! Your work will be graded on EWS. We will not give regrades for errors that occurred as a result of differences between the provided virtual environment/your home machine and the EWS environment. Be sure to test your code on EWS before you turn it in.
Hardware virtualisation setting Please check if your hardware supports virtualisation. If you are using an Apple computer, you probably already have virtualisation enabled, and you can probably ignore this note. Otherwise, check your motherboard’s statistics online. AMD motherboards with a virtualisation extension will be automatically enabled. Intel motherboards will occasionally have virtualisation disabled by default. You can enable this setting in the BIOS menu. If your machine does not support virtualisation, you can try to set up the 32-bit VM, but a remote connection to EWS may serve you better.
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.
Default user: dev
Default password: uiuc
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.
Shutting down the VM When you want to shut down the VM, hit Machine -> Close in the VM window. Try to make sure you choose the option “Save the machine state” instead of “Power off the machine”.
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
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.