HOME       >>       Websites and Web Designing

Tutorial: Using Oracle Virtualbox To Install An Operating System


This tutorial will go through the basic steps of installing VirtualBox on Fedora 18 but instructions may be similar for other Linux based operating systems as long as you use the right package manager. We will also be installing another Operating System (I am using CentOS 6.3 released 9 July 2012) inside a virtual machine to show how we can use VirtualBox.


What is VirtualBox?


VirtualBox is an application that makes it possible to run multiple operating systems at the same time within your own operating system, this would be running multiple virtual machines. Your limitation to the number of virtual machines you can run is limited by the amount of disk space and memory you have on your system. VirtualBox can be installed on Windows, Mac, Linux and Solaris as long as they are Intel or AMD (x86) based computers.


How to Install VirtualBox?


The easiest way to install VirtualBox is in a terminal type:


sudo yum -y install VirtualBox

This will find all the dependencies and install VirtualBox for you.


How to Start VirtualBox?


To simply run VirtualBox we type:


VirtualBox &

First Time Starting VirtualBox


When you start VirtualBox for the first time you are presented with the introduction that explains a few simple steps to creating your new virtual machine as well as suggesting if you need help to press F1.


Creating a New Virtual Machine


To create a new virtual machine, press the Ctrl+N or alternatively, grab your mouse and click on New


Name and Operating System


This section requires you create a Name for your new virtual machine. You can call it what you like, but make it easily identifiable as if you have many virtual machines, you don't want to difficulty knowing which ones to run. I am calling mine CentOS 6.3 Minimal because that's the version of CentOS and also the type of installation I want to perform. I do not know if names can be renamed at this stage. I only use VirtualBox for testing out new operating systems and helping with guides so if you are curious about what other features VirtualBox has, I suggest you read their documentation.


Choose the Type of your operating system. CentOS is Linux based which is the option I picked.


Now choose the Version of your operating system. If it is not listed, pick one that closely resembles the type of your distribution. CentOS is not listed in the options, however CentOS is based on Red Hat Enterprise Linux, so I picked Red Hat (64 bit) because it's CentOS 64 bit version that I want to install.


After you have filled out everything press Alt+N and hit Enter (possibly a bug as the action was not performed but instead outlined/focused on the button) or grab the mouse and click on Next.


Memory size


This option allows you to allocate how much memory you want for your virtual machine. I recommend you keep it as default unless you know specifically how much you want to distribute.


Press Alt+N or grab the mouse and click on Next.


Hard drive


This is where you can create a virtual hard drive which is disk space allocated to use for your virtual machine. You should be offered a recommended size which is OK for testing purposes but if you are going to be running it long term, you may want to configure this to have more space.


There are 3 choices you can make:

Do not add a virtual hard drive

This option is when you need to create something that may not be offered by the basic wizard of this set up. You can do this and later set up your machine afterwards.

Create a virtual hard drive now

This is the default option and the one we will be using.

Use an existing virtual hard drive file

This option lets you use an existing virtual hard drive file. This is good for when you want to try other types of set ups on the same virtual drive or replace the current operating system. e.g. You can create multiple boot systems, if you want to test out booting multiple systems on a single drive or you can overwrite an existing drive with another operating system.


Press Enter or grab the mouse and click on Create.


Hard drive file type


This lets you select the type of hard drive you want to use. The default is VDI (VirtualBox Disk Image) and the one I recommend. I am not too familiar with VirtualBox and have not looked into the different types of virtual drives and how they differ.


Press Alt+N or grab the mouse and click on Next.


Storage on physical hard drive


This section lets you pick whether you want fixed sized or a dynamically allocated hard drive. What fixed size means, is that if you picked 8GB as the size of your drive, then it will take the full 8GB from your own hard drive space for it. This method works faster but can take a while to create.


Dynamically allocated means that the hard drive will expand to the required amount. e.g. If your operating system is only 900MB, it will only use 900MB out of a potential of 8GB, it also means you don't need to have 8GB free, but if it can't expand, you may encounter problems. Every time you add more, the size grows. However, removing does not reduce the hard drive size. You also only have a maximum of 8GB, so it will not grow over that much.


The default option is Dynamically allocated and that's the option I am going to use, because I do not think I'll use all the space up and I am not planning on keeping these virtual machines. Choose whichever option you like.


Press Alt+N or grab the mouse and click on Next.


File location and size


Here you are asked to type the name of the virtual hard drive, can be the same as the Name you gave the virtual machine, or if you plan on using it for another operating system you could give it some sort of easy generic name, like vdi1, vdi2, etc. Call it what you like, I'm leaving mine as default.


You also have the choice of selecting how lard you want your drive to be. I am leaving mine as default as I have chosen Dynamically allocated, I know it's not going to use the full amount and the size will increase when I add more files to it.


Press Enter or grab the mouse and click on Create.




Congratulations, you have just created your first virtual machine. This is a blank system awaiting for you to install your operating system.


Oracle VM VirtualBox Manager


The screen you should see now, is actually the first screen from the start but without the introduction. You now have a virtual machine, so it is being displayed in the left, you also have a lot more options and can see a lot of settings for your virtual machine. To not get sidetracked from the purpose of this guide I am not going to go into detail about the settings you are seeing and am just going to focus on installing an operating system. If you would like to know more about these settings, refer to the documentation of VirtualBox.


Booting your Operating System media


If you have downloaded an ISO image of the operating system you are going to use, then you will be following the same steps that I am going to show you. If you are working with other type of media, then you will need to find out how to boot from that media yourself.


With your virtual machine selected press Ctrl+S or alternatively click the Settings button.


VirtualBox - Warning


On my first attempt at doing this, I was presented with a warning saying:


Failed to access the USB subsystem.


And then it talks about how to solve the issue by adding your user to the 'vboxusers' group.


So lets add our user to the vboxusers group. Inside a terminal do:


sudo usermod -a -G vboxusers YourUserName

Change YourUserName to the user you are using for VirtualBox. If your user is currently the active one you're using, you would be required to log out and log back in before changes take place. If you will not be using an USB media at this time, then we can proceed with the installation and can finish it first before logging out and back in.




Inside the settings you start at the General on your left side is Storage use the arrow keys to navigate to it or pick up the mouse and click Storage.




This screen shows the virtual IDE controller, virtual CD ROM and virtual drive interface. Press Tab till Controller: IDE is highlighted then navigate with the arrow keys till Empty is highlighted or alternatively, use the mouse to click on Empty. You should now be looking at the Attributes for the CD/DVD Drive on the IDE Secondary Master (Slave to the Primary Master, your virtual hard drive). Next to that is a CD with a drop down arrow, click on that and pick Choose a virtual CD/DVD disk file... and then navigate to where you downloaded your ISO image, select it and then click on Open. If it is a Live CD/DVD select this option, otherwise ignore it.


Press Alt+O or alternatively grab the mouse and click on OK to complete the settings.


To start your virtual machine highlight it and hit Enter or alternatively click on Start


First Running of Your Virtual Machine


When you first run the virtual machine, you maybe presented with a number of different dialogs. Be sure to read them as they provide tips of how to escape out of your virtual machine, as virtual machines like to take control of keyboard and mouse while you're inside it, which means your host operating system in the background will not respond to them. The main one I use is Right Ctrl this gets you out of capture mode so that you can get out of the virtual machine. If you do not want to be reminded about these things click on the Do not show this message again, then press OK.


From here on in, you're on your own. I believe I've provided enough for you to begin installing your operating systems, as right now the only steps left are to install your operating system.


Before I leave you like this, when you finishing installing your operating system. Go back to the Settings > Storage and remove the ISO image from your virtual CD/DVD drive so that you will not be asked to install it on boot.


You should now be able to run multiple virtual machines with many different operating systems on them now. This is a perfect way for testing out new versions of operating systems, or even completely new operating systems to get an idea of what they are like. However, do not judge performance, as that is related to the virtual machine and limitations it may have rather than your physical operating system.






in Ubuntu variants its

sudo apt-get install Virtualbox

great tutorial MC


Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.