Virtualbox tutorial for beginners

What is Virtualbox ?

Oracle VM Virtualbox or Virtualbox is the only open source software for virtualization.You can use this software to create virtual machines.Virtualbox is available for all major operating systems like Windows,MacOS and different Linux distributions.

Virtual Machine make it possible to run one operating system on top of other.Lets understand this with example.Suppose you have Windows operating system installed on your machine (referred as base or host operating system).You need Linux operating system for some work.Then you have option to install Linux in parallel with Windows (multi boot) or install Linux on top of Windows.

Installing Linux on top of Windows have many benefits.

  • You can install any number of Linux distributions along side Windows.
  • You do not have to reboot your system for accessing your host operating system or different installed system.
  • You can easily share files and folders between all the operating systems installed.
  • You can delete or reinstall the operating systems (except base one) without affecting others and with ease.

Having seen some of the benefits lets dive into more details about Virtualbox.

Installing Virtualbox

Virtualbox installation is pretty straight forward.The steps mentioned above do apply for all operating systems with slight modification of course

  • Download Virtualbox from official site download link (according to your operating system).
  • Download the extension pack as well.This is important as well.
  • After downloading the file installation is like any other software.
  • After installing Virtualbox just start the program.It is now time to install the extension pack we downloaded above.
  • Double click the extension pack.A new window will open with Install option.Just follow the instructions to install the extension pack.

Creating Virtual Machine with Virtualbox

Oracle VM Virtualbox makes it extremely easy for newbies to create virtual machine.Follow below steps to create virtual machine

  • Start the Virtualbox.
  • Click on the New Virtual Machine Option or press CTRL and N keys together.
  • Press the NEXT button on the screen displayed.This will bring below screen
  • Choose the Operating System and Version on this screen.Give the name of virtual machine(you can give any name you want).In below case it is Fedora and then click on NEXT.

VM name and OS type screen of New Virtual Machine option of Oracle VM Virtualbox

  • Select the amount of memory to be used by new machine.The memory assigned to new machine should be less than 50% of total memory (RAM).You can slide the slider to increase RAM to be used by virtual machine.If you make it more than 50% then non optimal setting detected message gets displayed.

Memory screen of Create New Virtual machine option of Oracle VM Virtualbox picture

  • Choose the boot hard disk for virtual machine.You can choose an existing hard disk or create a new hard disk.If this is first time you are using it then choose the option of creating new hard disk.This virtual machine will use this hard disk same way as your current installation uses your hard disk.

Virtual hard disk screen of Create New Virtual machine option of Oracle VM Virtualbox picture

Which Virtualbox hard disk storage type to use?

While creating Hard Disks for the virtual machine users have two options for selecting hard disk storage type

  1. Dynamically Expanding Storage
  2. Fixed Size Storage
READ  Sharethis widget Make your site social easily

Below is the pros and cons of both the types

Dynamically Expanding Storage

Benefits — Dynamically expanding storage type is faster while creating the hard disk.It will be created within few seconds.This option helps in utilizing hard disk memory efficiently.Let the memory limit specified for the hard disk be 20 GB then only part of it is used and rest is available to the host operating system.The storage grows on need basis.

Drawbacks –While installing operating system the time taken is approximately double than normal installation time.The machine performs well after installation but slow performance is encountered while performing huge file operations or download operations.If you have only 1.5 GB storage free and you are downloading or copy files of size equal to or more than 1 GB then performance is very slow.The storage grows as needed causes this slowness. Sometimes the messages like no free hard disk space available pops up.This happens when memory falls below 250 MB. Until and unless there is need of expanding the hard disk space Virtualbox does not do it.

Fixed Size Storage

Benefits — The installation time of operating system is normal.There is no performance issue like that of dynamically expanding memory method.The virtual machine works great all through.

Drawbacks — Fixed Size Storage is slower while creating the hard disk.It will be created in 40-45 minutes or even 1 hr depending upon size of hard disk to be created.The size of hard disk is fixed.So hard disk memory is not fully utilized.For example if user wants to create 20 GB hard disk then whole 20 GB is given to virtual machine whether the memory is used by virtual machine or not.

  • Select the hard disk storage type depending upon your requirement.For most cases dynamic storage just works fine.

Hard Disk Storage type screen of Create New Virtual machine option of Oracle VM Virtualbox picture

  • Browse for the location of virtual disk.It is safe to use the default location until and unless required.Type a name for the hard disk. Select the size of hard disk(the size should be less than the hard disk size of your system i.e. if your system hard disk is of 120 GB then you should use less than 100 GB for virtual hard disk).This is the maximum size a dynamically expanding hard disk can have and it is fixed size of a hard disk

Virtual disk location and size screen of Create New Virtual machine option of Oracle VM Virtualbox picture

Installation Operating system on Virtualbox virtual machine

Installation method of operating systems on Virtualbox virtual machine is same as that of on normal systems.The installation process is simpler as you are using the whole virtual hard disk created above for installation.You can skip difficult step of formatting hard disk and continue with installation.

The only part important is selecting the installation ISO file or other file format supported.You can do so using below steps

  • Select the option Settings of the virtual machine
  • You will see Storage option in the next screen.
  • On the storage tab you can see CD or DVD icon.Browse your file system to select ISO file of operating system to be installed on this virtual machine.
  • Now you can start the virtual machine.It will boot as your normal system.
  • Proceed with the installation as you would in case of normal system.
READ  Google Adsense CloudFlare issue and solution

Installing Virtualbox guest additions

Vrtualbox ships with guest additions iso file.It contains pieces of software (you can also refer it as drivers) to make your guest operating system (one installed within Virtualbox virtual machine) more compatible with host system.

So first thing is to install guest additions after installing guest operating system.You need to boot your virtual machine.After starting virtual machine you can see Devices option.Under that option you can see Install Guest Additions option.Clicking on that option will mount guest additions iso file to cd drive of your virtual machine.

You can double click the right installer in that ISO file to install guest additions on your system.For example if your system is x86 64 bit then you need to choose that installer.For linux you need to mount your drive and use terminal to run ./installer file name.After installing guest additions restart your virtual machine to enable the changes.

Adding host folders to Virtualbox Virtual Machine

To access host folders and files (files and folders of operating system installed on your machine) from Virtualbox virtual machine follow below steps
Oracle VM VirtualBox Shared Folders

  1. Go to the Devices option of the Virtualbox operating system window(virtualbox operating system window is window in which the virtual operating system boots)
  2. Click on the shared folder option.
  3. A window is displayed click on the top link to add a shared folder.
  4. On the next window click on the drop down(in front of folder name) and select other option see the figure below.
  5. A file browser window is opened.Select the directory of the host system which you want to access from the virtual machine.
  6. Select the option Make i.e. the folder is available after system reboot also. Permanent if you want to access this folder from virtual machine permanently.Select the option Read only of you don’t want to copy or write files or folders from your virtual machine into your host folder(the folder you are sharing)

Next We will see how to access these files and folders from Virtual Machine.We will use Shared Folders to denote files and folders shared by host system using above technique.

Accessing shared folders from Virtualbox Virtual Machine

To access shared folders from your windows virtual machine follow below steps

  1. Click on the START menu and then click on MY NETWORK PLACES.A windows pops up.
  2. Click on Add a Network place under Network tasks menu on the left side.
  3. Click on the NEXT button on popped up windows.Then on the next screen choose the option Choose another network location and click on NEXT.
  4. On this screen click on the browse button.
  5. A window Browse for Folder is displayed.Under the Entire Network you will see the option Virtualbox Shared Folders.
  6. Choose the folder you want to access and click ok.
  7. Next time onward you can view the folder icon at My Network Places.Just click on the folder and you can access the folder contents.
READ  Add ads between content without plugin

To access shared folders from your Linux virtual machine follow below steps

  1. Open the terminal and type command “su -” to use the terminal as the root user.
  2. use the command “mount -t vboxsf virtual-folder-name folder-name-for-mapping” in this command replace the virtual-folder-name with the name of host folder to be shared i.e. if host folder name id example then replace virtual-folder-name with example and folder-name-for-mapping is the folder on virtual operating system where this shared folder is to be mapped for example suppose you want to access shared folder from /mnt/shared then replace folder-name-for-mapping with /mnt/shared.
  3. Next time onwards you can use /mnt/shared to access the contents of shared folder.

Setting system date and time of Virtualbox virtual machine

System date and time are very important information. If your system date and time is not correct then you may face problems during internet browsing.To try this out set your time to any month and time of year 2008 like first January 2008 then browse internet.You will get invalid certificate errors (while trying to access gmail or any site which is https secured http).The reason is your browser takes the date information from your system.

Now if you are getting above issues while browsing internet from Virtual Machine then change system date and time of your virtual machine using below procedure

  • Go to your host system (not the virtual machine)
  • On the right hand bottom corner of your screen you will see date and time.Double click on that and in a new window you can change the information.Set it to current date and time.Save the changes.
  • You can validate the change by looking at the information again.After validating proceed to next steps.
  • The changed date and time will reflect in your virtual machine.
  • The important point to note here is that you can not change your virtual machine date and time (you can change but it will automatically get set to host system date and time).
  • Check your virtual machine to see the change.

Accessing USB on Virtualbox virtual machine

USB drives can be attached with virtual machines.You can also access Data Cards (wireless internet cards) also from virtual machine.To enable USB access from virtual machine follow below steps
tata photon plus or reliance net connect or any other wireless device configuration on usb tab of virtualbox

  • From Virtualbox startup screen click on the virtual machine you want to enable USB for
  • Go to USB option inside Settings option of the Virtual machine
  • Click on the USB option and make the changes as shown in the above picture.


Virtualbox is an excellent software.It does provide wide range of possibilities for a developer.One of the usage is installing Trial version of softwares on Virtual machine.You can re install the operating system on Virtual Machine after expiration of trial period.

Feel free to share this post and your thoughts.

16 comments Virtualbox tutorial for beginners

  1. Hi Esha,
    As Kumar mentioned I am also getting the same error of Storage Device Warning
    we could not detect partition or file systems as the hard disk might be virtual or empty I can share the screenshot I’d you can share your email id

  2. You are creating new virtual hard disk right.Also I would suggest using steps mentioned in this post.Do not use Parallel hard disk.VDI is fine.Also you can share screen shot is possible

  3. Hi Esha,

    I am facing some problem.

    I have delete the directory .virtualbox before installation.

    In my Windows OS(Host) having two drives.

    I am writing some steps which i have followed..

    after installation of virtual box when install CentOS.

    I have give Os name CentOS

    -Create a virtual hard drive now

    – VDI ( VirtualBox Disk Image)

    – Dynamically allocated

    – Memory allocated 1 GB

    – File allocation size 8 GB

    when click to CentOS in left pane side of VM manager.
    it show Box for select start-up disk

    Host Drive ‘E:’
    Host Drive ‘F:’

    ( i have Centos dump (CentOS-6.5-i386-bin-DVD1) which is on desktop, i have select there)

    then installation start…

    during installation, it gives me

    Storage device Warning

    The storage device below may contain data.

    8192.0 MB

    we could not detect partitions or filesystems on this device.

    This could be because the device is blank, unpartitioned, or virtual. if not, there may be data on the device that can not be recovered if you use it in this installation. we can remove the device
    from this installation to protect the data.

    Are you sure this device does not contain valuable data?

    – Yes, discard any data

    – No, keep any data

    I have select- No, keep any data

    then show

    -No usable disks have been found


    -Exit installer

    I have tried also with other option.

    firstly i delete previous CentOS icon.

    – now i have select HDD (parallels Hard disk) instead of VDI ( VirtualBox Disk Image)

    now i click to CentOS

    it show the error: FATAL: no bootable medium found. System failed.

    now click on Device Menu then CD/dVD device and select CentOS-6.5-i386-bin-DVD1.

    CentOS installation start after some time, it give the same warning:

    Storage device Warning

    The storage device below may contain data.

    8192.0 MB

    we could not detect partitions or filesystems on this device.

    This could be because the device is blank, unpartitioned, or virtual. if not, there may be data on the device that can not be recovered if you use it in this installation. we can remove the device
    from this installation to protect the data.

    Are you sure this device does not contain valuable data?

    – Yes, discard any data

    – No, keep any data

    I have select- No, keep any data

    then show

    -No usable disks have been found

    -Exit installer

    please suggest..

  4. Thanks Esha.
    Yesterday i have uninstalled virtual box and CentOS also.
    Today i will do fresh installation.

  5. I am not much centOS buddy.But sometimes your virtualbox configuration may get corrupted causing this kind of issues.On fresh installation of virtualbox see if the error persist.

    Also before fresh installation delete the directory .virtualbox (hidden one) in your Users folder.This has configuration settings so if without deleting you are installing the configuration will remain the same

  6. Hi Esha,

    Before installing the extension pack, i was using VirtualBox-4.3.18-96516.

    one day i have installed new version VirtualBox-4.3.20-96997 and installed extension pack then also installed epel-release-6-8.noarch.rpm on Centos. i thought it might be helpful to use USB drive in guest os.

    generally, epel-release-6-8.noarch.rpm contains extra packages for newer versions of popular software.


  7. Hi Esha,

    Thanks for Ur reply.

    Another issue are appear.
    CentOS are not running from last 2 days. I am using VirtualBox-4.3.20.
    Firstly, i have installed VirtualBox-4.3.20-96997-Win. then installed Oracle_VM_VirtualBox_Extension_Pack-4.3.20-96996 on windows and installed epel-release-6-8.noarch.rpm on Centos.
    After open Oracle VirtualBox Manager. when i click to CentOS 6 icon, it show CentOS 6 running mode. a virtual box window open. in this window, only blank screen appear, after waiting of 20 minutes, it show progress bar. but login window for CentOS are not appear. only progress are showing.

    Yesterday, I have reinstalled VirtualBox-4.3.20 but same issue appear.


  8. Open the Shared Folder in CentOS and then you can copy the folder from there.Are you able to cd into shared folder from guest?

  9. Hi Esha,

    Thanks for reply.

    I have made shared folder read write in guest OS. and shared folder have a doc file which i put from host OS (Windows OS). but how this folder accessible in Guest OS (CentOS).


  10. You can make Shared Folder read only or read write.You can access this folder from Guest as well as Host.The files you want to copy can be placed in this folder and will be availble for Guest.Similarly from Guest you can write on this fodler and make files accessible from Host.

  11. Hi,

    I have WIndows7 32 bit as a host OS in C drive. and i have installed the Virtualbox in D drive and installed CentOS 6 in virtual box as a guest OS.

    After installing the Guest Additions in CentOS and set the Drg n Drop-Bidirectional. it permits to create shared folder in CentOS but i am not able to drag n drop to any file from host to guest and vice versa.

    also when i plug the pendrive it copy the partially data in guest OS then it show unpluggeed automatically in guest OS. It copy only .rpm file in guest OS (CentOS)

    please suggest how to copy the file from Host OS to guest OS and vice versa. and how to use share folder.


Leave a Reply

Your email address will not be published. Required fields are marked *