Installation and setup of VirtualBox in Linux

Installation and setup of VirtualBox

In this post I’ll explain how to setup and install VirtualBox in Linux and how to install an operating system on the virtual machine, using an installation .iso file. Instructions will be given in a step-by-step form, with lots of screen shots. The example is given with Linux (Mint), but the procedure is very similar with Windows.

Needed explanations will mostly be given beneath the pictures.

Virtual Machine” will be called “VM” in the remainder of this text.

Contents:

  1. Installing VirtualBox
  2. Configuring VirtualBox
  3. Creating a new virtual machine
  4. Configuring the virtual machine
  5. Appendix – network configuration


1. Installing VirtualBox

In Software Manager search for "virtualbox" and click on it to install. You will be asked to enter your root password for the installation to commence.
In Software Manager search for “virtualbox” and click on it to install.
You will be asked to enter your root password for the installation to commence.
Picture 1


2. Configuring VirtualBox

After the installation, start the VirtualBox. First thing to do after installing is to setup where the virtual machines will be stored. Since this computer has only one (relatively small) SSD, I’ve decided to place the files within the /home/relja/VirtualMachine directory. The procedure is shown in picture 2:

Choose File-Preferences (1), set the VM directory (2) and click "OK" (3)
Choose File-Preferences (1), set the VM directory (2) and click “OK” (3)
Picture 2


3. Creating a new virtual machine

Now we need to create a new VM
Now we need to create a new VM
Picture 3
Choose a name for the VM (1), set the OS type it will be using (2) and OS version (3), then click "Next" (4)
Choose a name for the VM (1), set the OS type it will be using (2) and OS version (3), then click “Next” (4)
Picture 4

Clicking “Next” opens new screens with settings:

Set the amount of RAM that will be allotted to the VM (1) and click "Next" (2)
Set the amount of RAM that will be allotted to the VM (1) and click “Next” (2)
Picture 5
You should create a new virtual disk (1), unless you've already created one - click "Create" (2)
You should create a new virtual disk (1), unless you’ve already created one – click “Create” (2)
Picture 6
Choose the marked option (1) unless you have a very good reason to choose otherwise and click "Next" (2) VHD option is useful for remote VMs with slow network connections
Choose the marked option (1) unless you have a very good reason to choose otherwise and click “Next” (2)
VHD option is useful for remote VMs with slow network connections, because it creates several smaller files, not one large, like VDI does.
Picture 7
I prefer choosing a fixed size (1) so I know how much room there is on both the physical and virtual machine
I prefer choosing a fixed size (1) so I know how much room there is on both the physical and virtual machine, then click “Next” (2)
Picture 8
Choose the directory name where VM will be stored (1) and how much storage space will be allotted to it (2), then click "Create" (3)
Choose the directory name where VM will be stored (1) and how much storage space will be allotted to it (2), then click “Create” (3)
Picture 9


4. Configuring the virtual machine

Now it is the time to configure the created VM.

Select the created VM (1) and click on "Settings" (2)
Select the created VM (1) and click on “Settings” (2)
Picture 10
Click "Storage" (1), select CD-ROM icon (2) and choose .iso file (3) with the OS installation (by browsing) - then click "OK" (4)
Click “Storage” (1), select CD-ROM icon (2) and choose .iso file (3) with the OS installation (by browsing) – then click “OK” (4) – IF you are using SSD, don’t click “OK”, but stay on this screen and look at the next picture.
Picture 11
If you are using a SSD, click "Storage" (1), then choose the VM file (2) and check SSD (3) - then click "OK" (4)
If you are using a SSD, click “Storage” (1), then choose the VM file (2) and check SSD (3) – then click “OK” (4)
It is on the same screen as picture 11
Picture 12
All that's left now is to run your newly crated VM It should boot from the selected .iso file
All that’s left now is to run your newly crated VM
It should boot from the selected .iso file
Picture 13

Finishing note – boot order can be altered as desired:

Select "System" (1), select virtual drive and move it up/down boot order list (2), then click "OK" (3)
Select “System” (1), select virtual drive and move it up/down boot order list (2), then click “OK” (3)
Picture 14


5. Appendix – network configuration

Personally I prefer setting up network configuration “manually”, with fixed values (no DHCP with IPv4, nor DHCPv6, or SLAAC with IPv6). When the IP address of the host computer has been set fixed, that setup can also be used with VirtualBox. That is done the following way:

Click on "Global Tools" (1), then "Create" (2)
Click on “Global Tools” (1), then “Create” (2)
Picture 15

After clicking on “Crate”, a new virtual network adapter will be shown in the list below the options on the screen. Right mouse click on the newly created virtual network card, then choose “Properties”. There you will have the options for setting network parameters.

Choose "Configure Adapter Manually" (1), then enter your host computer's IP address (2) and subnet mask (3)
Choose “Configure Adapter Manually” (1), then enter your host computer’s IP address (2) and subnet mask (3)
Click “Apply” when done (4)
Picture 16

On the “DHCP Server” tab, it can be configured, or disabled:

Either tick the "Enable Server" checkbox and configure VIrtualBox DHCP, or disable it (1) - then click "Apply" (2)
Either tick the “Enable Server” checkbox and configure VIrtualBox DHCP, or disable it (1) – then click “Apply” (2)
Picture 17

Share...

1 thought on “Installation and setup of VirtualBox”

  1. This post is really helping me a lot initially I had no idea how to set up virtual box but when i read this article I got the idea of how can i set up the virtual box.

    Reply

Leave a Comment