Well, my laptop finally gave in. It was a quite old Dell laptop, previously belonged to my wife. When its hard drive failed, we bought her a new laptop, and I fixed the old one and installed Ubuntu. With Intel core duo processor, 2GB RAM, and seven years of service, it was OK for my needs (VIM, gcc and some internet), and now it’s dead…
So I bought this brand new laptop that runs Windows. Even as a Linux developer I must admit that Windows is a far better desktop OS than any Linux distribution out there. Linux has its advantages in other areas…
With this new computer running Windows, I had to install a VM, so I can continue developing at home. A college recommended using Oracle’s VirtualBox, so I’m giving it a try. Installing it was not trouble free, so I’m summarizing my work here.
- Download VirtualBox from here. I myself installed Ubuntu 16.04, downloaded from here. You can, of course install any OS you’d like.
Important: By default, VirtualBox saves its VM files under your user folder, and it doesn’t like strange character in its file path. If you have a username with non-english characters, you might encounter issues along the way, some of which might be critical (That is, you might not be able to complete the installation).
- If you want to to install a 64Bit OS, you need to enable CPU virtualization. This is done from UEFI (previously known as BIOS), So you’ll have to restart your computer and enter the UEFI settings before Windows comes up.
Pay extra attention to what you’re doing here. Changes you make to the UEFI (BIOS) might be harmful to your computer and are at your own risk!
- Open VirtualBox, click “New” and select your desired OS. Give it a nice name, and click “Next”.
- Give it enough RAM to suit your needs:
- Next you need to create a hard drive. VirtualBox, for some reason, recommends 8GB, this is not enough for anything. Changing the hard drive’s size when you already have data on it, is a pain, so I recommend a size of 80GB. This is enough for the OS (for Ubuntu, at least), and if you need more storage (doubtedly) in the future, you can always add more hard drives.
You can choose the hard drive to be allocated dynamically, and this way you won’t waste space on your real hard drive (as opposed to choosing fixed size, which allocated the whole amount from the first byte you use). Although, with the drives sizes you have today, it’s hardly a consideration.
This is the only step I’m not really sure of – Choosing the chipset.
There are two types of chipsets you can use – PIIX3 or ICH9. The thing is, the guest OS must support the chipset. VirtualBox, by default, sets this to PIIX3, and it really should work. But it didn’t. For me, it worked only with ICH9, so I guess Ubuntu 16.04 doesn’t support PIIX3 (Again, not sure of this).
You can try either option, as I said – it should work, just remember that if you encounter any critical issue (ie, OS doesn’t start), this might be the source to the problem.
- If you want to work in full screen mode, with proper resolution, this is the first step you need to do – Giving the video card enough memory. I don’t really care what the minimum is, I give it the maximum possible. this might not be a good advice, but I didn’t find any serious performance issues while running my VM.
- Now you need to mount the Ubuntu installation disk image:
- Now we can start our VM, so when you’re ready, click on the green arrow.
You will see the Ubuntu installation screen. Choose “Install Ubuntu” and follow the guide, it is really straight-forward. When the installation ends, it displays a “Restart” button. Click it. (For some reason, first time boot didn’t work for me, I had to restart the VM again. Just mentioning in case it happens to you too)
- For the second step of enabling full-mode, while your installation is executing, you need to download VirtualBox’s “Guest additions”. This is an image file (.iso), that autoinstall once mounted.
This file is actually hard to find. There is one downloadable version from this page (where you download VirtualBox from). But all the images themselves can be found here (according to your VirtualBox version).
- The installation ended, and YES! We have a working Ubuntu 16.04 VM!
- Installing the guest additions, in VirtualBox VM’s window click on “Devices” and “Insert guest additions CD image”:
Choose your image file and confirm the execution. When the installation is done, restart your VM.
- Last thing to do (if you want to work in full screen mode) is to set the resolution. Check your resolution on Windows, and set the exact settings in Ubuntu.
Click on the “Settings” icon, and choose “Displays”, then set your correct screen resolution.
Press right-ctrl+F, and you’re in full screen mode!
That’s it. Can’t say it was short, but hopefully by now you have an Ubuntu VM working.
Hope you find this guide helpful.