Accessing the fourth dimension — Virtual Machines
Its come to my attention that many of my classmates are having difficulties with their virtual machines.
Firstly, what is a virtual machine?
Sometimes its more convenient to create a ‘portable’ operating system that exists inside of another, this allows you to be comfortably using the operating system you’re familiar with (Such as Windows) while also having another environment. (Such as Linux/Ubuntu)
How do I (properly) setup my virtual machine?
- Install Oracle VM Virtualbox.
This should have been done in the first week, here is the link for VBOX 5.1.14: Click to Download - Make sure Processor Virtualization is enabled!
To do this you need to search on google for how to do it as it is different for everyone’s computer.
Try the search term (“Laptop Model” + Bios virtualization).
(Also make sure you search it on your phone not your laptop). - Make sure Hyper-V is disabled!
Hyper-V is a feature in windows that allows native VM creation, however it actually causes conflicts with oracle vm, so we need to disable it.
Do this by clicking on your windows logo and typing:
Turn Windows features on or off
Scroll down to the section where it says hyper V and untick the box.
If you don’t see Hyper-V in that box, skip this step. - Import the appliance.
Ben (Our tutor) has already created a virtual machine appliance, which is like a little installation package with a virtual machine pretty much setup already.
This was the CODE VM.ova which we imported using (Ctrl+I) or going into File -> Import Appliance. - Start the VM.
After waiting a little while, your package should show up.
Select your VM and click on the settings icon.
Make sure you change the operating system to the appropriate one as shown here:
Click OK after that’s done and start the VM!
This concludes the initial setup. Lets move on to inside the VM.
- Git Setup instructions:
Follow this link for instructions on how to complete the internal VM setup. - Other things:
Ben left out a few commands in that link:
sudo pip install colorama
and then
sudo pip install flake8==3.2.0
Type these into terminal. - If you’re up to week 5:
Make sure you run
sh code1161base/week5/week5_system_prep.sh
before attempting any of the exercises.
Optimizing VM:
I’m sure by now you’ve realized how slow VM is, here’s how to speed it up.
- Close your windows processes.
Please don’t leave rhino or other intensive programs running while you’re using a VM (Unless you’re very sure that your computer can handle it)
Just because your computer is an i7, doesn’t mean its a powerful i7
(You might have an ultrabook i7 as opposed to a mobile i7) - Allocation of system resources:
In your VM settings, if you go to the system section on the left column, you’ll see some information about what resources are going into your vm.
In the motherboard tab, change your Ram to around 4GB (Or lower until you’re in the green zone)
In the processor tab, change the cores to around 4 (Or again, lower until you’re in the green zone) Leave execution cap at 100%.
In the Display section of the left column, change the video memory to about 64mb or higher. Apart from that, everything should be running relatively speedy now. - Enable clipboard sharing:
Fun fact, you can copy from windows and paste in Ubuntu.
If you go to the General section and the Advanced tab, you’ll be able to change the shared clipboard to Bi-Directional. - You’re done. Congrats
Final notes:
By now your VM should be running pretty speedy. If you have any problems such as errors or performance issues, google them. If you find no solution you can try contacting me on slack. (Make sure you tag me).