Jump to content

  •  

Photo
- - - - -

How to Install and Use Virtual Box

Windows 7 Windows 8

  • Please log in to reply
No replies to this topic

#1 Wilson18

Wilson18

    Administrator

  • root
  • 112 posts
  • LocationUniversity of Birmingham

Posted 26 May 2014 - 06:28 PM

In this guide I will be showing you how you can create your own virtual machine using virtualbox on Windows. I will be doing the following on Windows 7 but im sure this should be similar for all of you using a windows operating system. I will be showing you how you can install Ubuntu Server 12.04 however you can install anything you want on it. You can download this here if you haven’t already and install it. If you would like to find out more about Virtual Machines then click here.

WHAT DO YOU NEED?

  • ISO of the operating system you would like to install (or a installation disk)
  • An internet connection
  • Virtualbox
  • Windows PC

 WHAT YOU WILL BE DOING:

  • Creating the System
  • Installing the OS
  • Editing Resources
    • Change Number of Accessible CPUs
    • Change Amount of Accessible RAM
    • Setting it to bridge with your network adapter
  • Creating/Restoring/Removing Snapshots

CREATING THE SYSTEM

Once you have installed Virtualbox, you can add your very first virtual machine. We can do this by clicking the NEW button at the top. This should then bring up a window like this:

Create-a-New-Virtual-Machine.jpg

 

Click Next 

Choose-an-OS.jpg

In here, you can choose a name for the system. This is just to let you know in future what it is. Where it says ‘Operating System’ you will need to choose which type of Operating System it is. Where it says Version you will need to pick which version it is.  In the next window you will be able to set the amount of ram you would like to use for this VM.

Select-RAM.jpg

Depending on which operating system you are installing, you will need to select the appropriate amount of RAM for this VM to access. Make sure you at least use the minimum requirements. I will be using 1GB ram (or 1024 MB). We now need to create the hard drive for this VM to use. We configure this in the next window.

Virtual-Hard-Disk.jpg

Unless you know what you are doing, I would use the Create a new hard disk option. After this, click next. This will then bring up a new window so you can create the new hard disk.

Create-new-Virtual-Disk.jpg

I am going to be using VDI for this hard drive. You can choose another if you know what you are doing. In the next window, you need to select how you would like your new hard disk to function. You can either tell it to have a fixed size or to dynamically increase when more files are added. With either way you set it, you can still control the maximum hard drive size.
Virtual-Disk-Storage-Details.jpg
File-Location-and-Size.jpg

In this window, you can choose the size of the drive the machine will be able to access as well as the location you would like to make this drive. Make sure you provide the system with enough space for the system to function correctly. After you have done that you can click Create. You will then see a system summary. If you approve then click Create.

INSTALLING THE OS

When you have finished creating the VM, you will need to install the operating system you would like to use on it. To do this, you will need to run the VM. You can do this by double clicking it in the list of your VMs. When you do this, you should see the following wizard.

First-Run-Wizard.jpg

Click next. On the next window you will be asked to choose the installation media. You can either choose a DC/DVD drive with an installation disk or by searching for an ISO and selecting that.

 

Choosing-Installation-Media.jpg

Once you have done this, click next. You will then see a summary page. If you click start, the installation will start as it would on a physical machine.

 

Summery.jpg

After this is done, you may need to remove the installation media to make sure that it does not boot from that when the VM restarts. You can do this by going to Devices, CD/DVD Devices, Remove disk from virtual drive.

 

Remove-Installation-Media.png

 

 

MAKING CHANGES TO VIRTUAL MACHINES RESOURCES

If for any reason you need to make any changes to the system resources of your VM then you can easily do this. This would be incase you need to change things like the amount of RAM it can access. To make a change, you will first need to make sure that the VM is turned off. Once you have done this, you will need to right click the Machine Name and click settings

 

Editing-System-Resources.png

When you do this, another window will open. This is the window which will allow you to configure and make any changes you wish to. I will be showing you how you can change the number of cores the VM will have access as well as the amount of RAM.

CHANGE AMOUNT OF ACCESSIBLE RAM

In the settings window, if you go to the Systems tab and go to the motherboard section, you will see the following:

 

Change-RAM.jpg

To edit the amount of accessible RAM, simply change the section saying base memory to what it is you would like. Please make sure this does not exceed the number you currently have. Once you have done that, simply click okay and relaunch the server.

CHANGE NUMBER OF ACCESSIBLE CPUS

If you wanted to change the number of CPUs it has access to then you can again go to the systems tab and go to the processor section.

 

Change-Processor.jpg

The top bit saying Processor(s) can easily be changed to the number of processors you would like the VM to access. Please make sure this does not exceed the number you currently have. Once you have done that, simply click okay and relaunch the server.

 

EDITING YOUR VMS NETWORK ADAPTER

 

 

If you plan to use your VM to host a server or any device you want to be able to access via IP then you may want to set it to use the same network configuration as your current pc. This way it will receive an IP address from your router rather then your PC. This is very handy and if you follow any of my guides in regards to networking or linux, you will need to follow this. In the settings for your VM, you will need to go to the network tab. You will see that by default that it looks like this:

 

 

Editing-Network-Configuration.jpg

What you will need to do is to change the part where it says attached to from “NAT” to “Bridged Adapter”. When you do this, you will see that the drop down box below this now becomes changeable. These are just the list of network adapters you have on your PC. It should be okay with the default but you can change this if you require.

 

Bridge-Network-Adapter.jpg

Once you have done that, simply click okay and relaunch the server.

 

There are plenty of other settings you can play around with so make sure that you have a read through them all and find the best way of doing things.

 

CREATING/RESTORING/REMOVING SNAPSHOTS

One good thing about virtual machines is snapshots. A snapshot allows you to take a virtual picture of all of the data inside a virtual machine. What this means is that if you wanting to do something like add a new feature or service to your VM but are wanting to back it up just incase you make a mistake, all you would have to do is take a snapshot. This way, if anything goes wrong, all you have to do is set it to restore back to that snapshot and everything will be just as it was… like magic! I use this all the time when doing my tutorials as it allows me to make sure that I can do both written and video guides on the same system.

To create a snapshot, it is best to shut the VM down. (You can do it while still powered up but I would recommend closing it first) Once you have done this, up virtualbox and in the top right corner you will see a button saying snapshots. Click this and you should see something like this:

 

snapshot.jpg

You will see that at present it says “Current State”. To take a snapshot of how the system is at present you will need to go to where that little camera is and click it.

 

Take-Snapshot.jpg

If you click this, you will see another window appear. In this window you can name the snapshot and add any details you would like to remind you about it in the future.

 

saving-a-snapshot.jpg

Once you have done this, you can click okay. When you do this, you will see a window with a loading bar appear. This is just Virtualbox saving your current state.  Once this is done, you will see it in the snapshots window. If you have done this several times while using your VM, it will looks something like this

 

Snapshots2.jpg

If you would like to restore or delete a snapshot, you can simply right click the snapshot you would like to apply this action to and click the either restore or delete.

 

Restore-Delete-Snapshot.png


List what you read?

Check me out on: YouTube, Twitter, Facebook, Google+






Also tagged with one or more of these keywords: Windows 7, Windows 8