Virtualisation is a really cool option for running different operating systems. Instead of having to buy a new computer or dual-boot an existing one, you can use virtualisation software to run a different OS from within your existing OS.

You can install Windows, Mac, Linux, whatever you want, really, and just open it like any other program, in a window, while your main system keeps going in the background. For example, you could have a Mac laptop with VMs running for Windows and Linux, you could have a Windows desktop running VMs for Mac or Linux, or you could have a Linux desktop that runs 50 other Linux systems virtually.

If you have install media (a Windows disc or Linux .iso, for example) then you can create as many machines as your hardware can support.

VMs share your system hardware and resources. If your desktop is a 3.5Ghz quad core, with 16GB RAM and a 500GB hard disk, then you can allocate certain amounts of that to the VM. For example:

Ubuntu Linux, assigned with 50.00GB hard drive space, 4GB of RAM and 1 core of the CPU.
Mint Linux assigned with 150.00GB hard drive space, 4GB of RAM and 1 core of the CPU.

This leaves 2 cores, 8GB and 350GB space for my main system. The bigger and beefier your main system is, the more virtuals you can run and the more you can allocate to each. So before you allocate to VMs it’s important to see how your system is already running. Before doing a round of VMs I check my system and see whether resources can be freed up if needed (for example, saving memory by dropping the animations and effects in Windows)

VMs are easy to use, require no extra hardware and are easily backed up and restored. They are ideal for testing, security and probably a million other purposes, and we’re going to be using them here to test some OS installs and perform some useful functions, like testing suspicious files and links.

The first thing to do is check compatibility – you need to be sure your current hardware can support virtualisation. To check if it does, you can web search your processor type, or visit:

Intel processors – http://www.intel.co.uk/content/www/uk/en/support/processors/000005486.html
AMD processors – http://support.amd.com/en-us/search/utilities?k=virtualization%3E%3E

Windows Users
If your CPU is OK then your next step is to enable a setting somewhere in your BIOS. Where that is will depend on your motherboard, but it should be fairly straightforward and say “Enable Virtualisation” or perhaps “Enable VT-x technology”. If you get stuck, do a web search for your motherboard/PC model. Once you’ve found the option enable it, save your settings and reboot (usually F10 twice will do this)

Mac users
Virtualisation should be enabled by default if your Mac contains a compatible processor. If not, you may need to download a firmware update. Again, a web search is your friend here.

Source Files

We are going to install Windows 7, Ubuntu Linux and Mint Linux on three different virtual machines. I’m using .iso files for the Windows install, even though I have a Windows disc, because it’s more reliable. I have run into problems installing Windows from optical drives on some machines, depending on whether the optical drive is classed as USB or SATA (more on that later). This doesn’t happen with .iso files.

Install files for our Linux systems can be found here:

Download .iso for Ubuntu 16.04 LTS
Download .iso for Mint 18 “Sarah”

Windows .isos can either be made from your existing Windows discs or downloaded here:

Download Windows .isos with MS download tool

For the Virtual Machines we’re going to be using a free program called VirtualBox by Oracle to run our virtual machines.

Download and install Oracle VirtualBox

At the time of writing we’re looking at 5.1.4, but updates are available through the context menu. It’s a very simple install procedure, and ticking YES to all the default options will be fine.

Once installed we will see this window:

Vbox welcome screen

Creating New VMs

For this next part you will need the .iso files that we downloaded for our OS. Click ‘New’ and choose the operating system type. Call it whatever you like, but I’m going simple and calling it UbuntuMachine (then MintMachine, KaliMachine etc. for subsequent installs).

VBox setup

I give each of mine 2GB of memory because I have a 16GB host machine. Choose an amount you can afford to spare.

vbox3

Then the virtual hard drive needs to be created. For this we can use a VDI image.

vbox4 vbox5

We can set a fixed size for the drive, but dynamically allocated is often better because it only uses the space incrementally. If you fix the virtual size at 40.00GB, then your host system loses 40.00GB of space whether your virtual uses it or not. With dynamically allocated space, if you only use 10GB out of 40.00GB for your virtual then your host system only loses 10GB of space.

vbox6 vbox7

Once the drive has been created we will be returned to the main screen, only this time our new machine will be listed on the left hand side.

vbox8

Before we go any further we need to check and set some settings. Highlight your VM and click the Settings button above it. Firstly, go to System and make sure that Hardware Virtualization boxes are ticked.

vbox9

Then we’re going over to the Network settings. There are different ways of configuring the adapter.

vbox10

NAT (default setting) will use its own subnet for the virtual machine. I have a host machine with an IP of 192.168.0.5, hosting a virtual machine with an IP of 10.0.5.2. The virtual machine has its own mini network (its own subnet of 10.0.5.x) within my subnet of 192.168.0.x. There will be more on this later, but for basic use we are going to want something different. If our host IP is 192.168.0.5 then we want our virtual machine to be 192.168.0.6. 

So we set Attached to: to be Bridged Adapter. That means that our virtual network connection is bridged from our existing one, and therefore continues to use its settings. It doesn’t create a new subnet like a NAT setting would.

Finally we go to Storage to set the .iso from which we will be booting.

vbox11

Here, we will click on the IDE drive, where it says Empty, once to highlight it. Then click the CD icon on the right of the screen, next to IDE Secondary Master. This will prompt us to choose a .iso file, so we will go to our Downloads folder and find our Ubuntu .iso. We are using Ubuntu 16.04.1 for our first install so select that. It will show up in our virtual CD drive and we’re good to go. Click OK, then click the green Start arrow to begin the installation.