How to install and configure Virtualbox

Virtualbox is a GPL licensed virtual machine or program used to “virtualize” (install one operating system inside another) an operating system. In my opinion, this program is more intuitive than VMware, and it works like a charm, in addition to managing the resources of our machine very well.

What is Virtualbox

Oracle VM VirtualBox is virtualization software for x86 architectures, originally created by the German company innotek GmbH. It is currently developed by Oracle Corporation as part of its family of virtualization products. Through this application it is possible to install additional operating systems, known as "guest systems", within another "host" operating system, each with its own virtual environment. That is, thanks to Virtualbox, we can create a "virtual machine" inside our Ubuntu and install and run Windows as if it were just another application. We can do the same in reverse, with Windows being the "host" system and Ubuntu the "guest".

Among the supported operating systems (in host mode) are GNU / Linux, Mac OS X, OS / 2 Warp, Microsoft Windows, and Solaris / OpenSolaris, and within them it is possible to virtualize the FreeBSD, GNU / Linux, OpenBSD operating systems , OS / 2 Warp, Windows, Solaris, MS-DOS, and many others.

The application was initially offered under a proprietary software license, but in January 2007, after years of development, VirtualBox OSE (Open Source Edition) emerged under the GPL 2 license.

How to install Virtualbox on Ubuntu

There are several user interfaces for Virtualbox, I am going to recommend installing the one for Qt, which in my opinion is the most complete and easy to use.

We open a terminal and write:

sudo apt-get install virtualbox-qt

Once installed, you can find it under Accessories> Virtualbox.

How to create a virtual machine

The first thing we have to do is create the virtual machine where we will then install the "guest" operating system. In practical terms, this virtual machine is nothing more than a file that we will have to host somewhere. This file will contain all the information and space necessary to allow the installation of the "guest" system.

To create the new virtual machine, once we have the program open, we click the button New. The virtual machine creation wizard appears. Each point that follows is a screen of this wizard:

1. The first screen welcomes us. We give the button Next.

2. The second screen asks us for the name and type of operating system we want to install. In our case, we can choose Microsoft Windows y Windows XP. In the name we write Windows.

3. The third screen asks us the size of the base memory. Generally, the default option is adequate. However, if you have a lot or a little memory, you can change this setting. For example, I have 2GB of memory and I almost always set this option to 512MB.

4. The fourth screen asks us in which virtual machine to install the guest OS. The first time we have to tell it that we want to install the OS on a new machine. However, in future opportunities where you want to format that virtual machine and install everything from scratch, you can choose it from the list. As I said, now we should choose Create new virtual disk.

5. The new virtual disk creation wizard appears. In the first screen we have to choose the type of storage. Generally, it is advisable to choose Dynamic Expansion Storage. This means that if your disk is going to have 3 GB the file does not always occupy that space but rather occupies but also that amount of space.
6. The screen that follows asks us about the size of the disk to create. This option depends on your needs. 5-10GB is more than enough to install Windows and a few heavy applications. In option Location you can choose where to save the file of your virtual disk. This is very convenient since many times the space that you dedicated to your Linux partition is not large enough to also house your virtual machine.

How to set up your new virtual machine

To configure the newly created virtual machine you just have to choose it and click on the button Configuration. A window will open in which we can change all aspects of the configuration of our virtual machine. Each of them is quite self-explanatory, so I will focus only on a few that are not so easy to know what they do or how they are configured.

Storage

From here you can control the disk configurations of your virtual machine. Generally, there are 3: your virtual disk, your cd-rom and your floppy drive. Here the element that one usually modifies is the cd-rom. From here we tell the virtual machine to "put" the ISO image of our Windows at startup. In this way, we can install Windows in our virtual machine without problems.

Then, we click on the CD icon within the storage tree. Once the cd-rom is selected, we click on the button next to the option CD / DVD device.

A window will open from which we will be able to add the ISO images of the different OS that we want to test. To add one, let's Add.
Finally, we select the ISO image and that's it.

What we just did is simulate inserting the Windows CD (assuming we choose an ISO image from the Windows CD) at boot. This is a necessary step to be able to install Windows in our virtual machine.

This is also very useful for testing Linux distros. Sure, you can lower the ISO of a distro you want to try. Then you tell your virtual machine to boot up by reading this ISO, say, Linux Mint 9. When you run the machine you will be able to test Linux Mint as if it were a Live CD, just as you could test it on a "real" machine. What's more, if you like it, then you can actually install it on your virtual machine. The end result would be this: you still have your Linux distro installed as usual, only now you will be able to run Linux Mint 9 and test it as if it were just another application. Interesting, right?

Shared folders

If you want your virtual machine to be able to access a folder on your "real" machine, you just have to add the path of that folder in this option.

To do this, click on the button that has a folder and a +, as seen in the following screenshot:

How to run the virtual machine

Well, this is the easiest. Choose your machine from the list on the main Virtualbox screen and press the Start button. Voila!


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

73 comments, leave yours

Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   saul said

    How to make the virtual machine interact is that when I enter it I cannot go back to linux

  2.   Hugo Rios said

    hello friend very good post I have a question how can I install a vb with windows 12.04 in ubuntu 7 ????

  3.   Saito Mordraug said

    As always, your posts are excellent, the explanation is very good because I remember that a while ago when I first installed VB it took me a little work to properly configure my virtualized system.

    Thank you.

  4.   Cesar Vasquez said

    MY PC HAS 3 USERS, IN ONE INSTALL THE VIRTUAL BOX AND THE CN XP VIRTUAL MAKINA .. BUT I CAN'T START SUCH VIRTUAL MAKINA FROM OTHER USERS, HOW DO I DO IT? SLDS ..

  5.   Let's use Linux said

    Assuming you have a distro installed on a VB virtual disk, I don't think you can. You have to create a new larger virtual disk and reinstall everything. : S

    Cheers! Paul.

  6.   Fabiola said

    very good thanks !!
    I have a question, if I already have the VB installed with 10 GB for example, can I increase that amount of memory at some point? or is it necessary to delete and install everything again?

  7.   Let's use Linux said

    Common sense indicates that it would not be a good idea, since the base system (in our case Linux) would run out of available memory. : S Greetings! Paul.

  8.   leo said

    I do not explain given that

  9.   leo said

    what happens if I assign all my ram memory?

    1.    The hacker said

      the pc started to lock up and you would have to turn it off forcibly by unplugging it

  10.   Jose GDF said

    Yes that is true. I couldn't connect anything via USB either.

  11.   VICTOR said

    HI. GOOD IS VERY GOOD YOUR POST NOW I HAVE A QUESTION, HOW DO YOU DO TO DOFY THE AMOUNT OF MEMORY ASSIGNED TO THE VIRTUAL MACHINE ONCE YOU SEE THAT THE SYSTEM YOU ARE GOING TO INSTALL IS ALREADY INSTALLED?

  12.   Let's use Linux said

    Victor, when you add a new virtual machine, it will ask you, among other things, how much memory you want to allocate to it. The usual is usually a number. between 256 and 512 MB.
    Cheers! Paul.

  13.   Daniel said

    I have not been able to use the USB either
    and from the virtual windows I cannot modify or add any file to the shared folder
    marks me as if the folder was in read-only mode

  14.   Daniel said

    I could already share the usb
    To do this you have to add your account to the virtualbox user group:
    System–> Administration–> Users and groups
    select your user and click on manage groups
    we are looking for the vboxusers group
    you double click, mark your username that is unmarked by default and click on accept and that's it
    we can already share the usb
    If you ask for your user password to make a modification, we simply enter it
    You will only have to start virtualbox again to be able to share the usb

  15.   Let's use Linux said

    Great! Thanks for the tip! 🙂
    A hug! Paul.

  16.   Colozo66 said

    hi, i'm using ubuntu 11.10 in virtualbox but it is very slow to load the pages the videos also freeze if someone can tell me why ?? first of all, Thanks..

  17.   Fredinxon said

    I have Ubuntu 10.10 and that does not come out anywhere in this vboxusers Group I can not do it, it will be that they open the name changed and it will have another

  18.   Edison said

    It is possible to view the usb through this version if this is how I can do it thanks

  19.   Let's use Linux said

    It is not a problem of "updates" but of version. The OSE version of Virtualbox does not detect connected usb devices. 🙁 A "solution" could be the following: http://usemoslinux.blogspot.com/2010/06/como-montar-dispositivos-usb-usando.html

  20.   Daniel said

    Well, in fact, if you can directly share the usb as I said in a comment earlier and here I repeat it:

    To do this you have to add your account to the virtualbox user group:
    You go to the users of your linux system
    System–> Administration–> Users and groups
    select your user and click on manage groups
    we are looking for the vboxusers group
    you double click, mark your username that is unmarked by default and click on accept and that's it

  21.   Let's use Linux said

    Apa! I didn't remember that ... interesting!
    Thanks for sharing it… again! 😛
    Cheers! Paul.

  22.   Let's use Linux said

    Nothing ... 🙂

  23.   gringuex said

    Hello, the post is very good, and the blog is very good. Here is the query:
    I want to use a virtual machine to test services (apache, squid, iptable) on the host host. If I leave it in NAT mode, the virtualized one takes an ip 10.0.2.x and navigates without problem .. but in the host I don't have an interface in that ip network .. do you know how I have to configure to do this? Thanks in advance, greetings.

  24.   Let's use Linux said

    Hello! The truth is that I didn't really understand what you want to do. Can't you test services directly on your machine without installing a virtual machine? 😛 Sorry for not being able to give you more help ...
    Hug and thank you for writing! Paul.

  25.   Braulio Jared Cano Angulo said

    It works well for me, I use 4.1.12 downloaded from the official website and with minimum requirements it works well for me, I think it must be the hardware capacity that your computer has

  26.   Israel Perez said

    very good it worked perfectly

  27.   Let's use Linux said

    Great! I'm glad.
    A big hug and thank you for commenting!
    Cheers! Paul.

  28.   GonzaloMontesDeOca said

    But the OSE version does not allow to connect usb devices… unlike the PUEL version

  29.   Nestor Jimenez said

    Hello when I did the first step I got this error not suitable module for running kernel found, how can I correct it since then it generates a problem for me

  30.   Luis Matias Arriagada Galvez said

    Do you know how I can make the virtual machine detect a DVD from the disk reader?

  31.   Alejandro said

    Do you know how to activate the USB ports? It's the only problem I have!

  32.   Let's use Linux said

    That seems ... 🙁
    I guess they will add it in future versions, right?
    Anyway, it is not something that I use too much. Lastly, you can use one of the shared folders. On the other hand, it would be necessary to see if a USB disk can be put as a shared folder.
    Have you tried it yet? If you do I would like to know the results.
    A hug and thank you very much for commenting! Your observation is very accurate!
    Cheers! Paul.

  33.   Arlex2014 said

    One question, do you know how I can make virtualbox run my usb memory? is that I want to run a program on the usb and it does not recognize me

  34.   Paco said

    Hi, you know? An error happens to me, when running my machine, I get a «FATAL: No bootable medium found! System halted »I don't know why, if you can help me I would be too grateful

    1.    Give us said

      You have to add an .iso disk at the beginning since by default it is configured so that the main unit is the dvd

  35.   Let's use Linux said

    That means the BIOS cannot find the operating system to boot ...
    Could it be that you modified the BIOS to boot from somewhere else (the cd, the usb, etc.)?

    It can also be due to a hard drive crash or poor GRUB installation.

    I hope I have been of some help ...

    Cheers! Paul.

    ps: by the way, what a bad image I got from Mexico today. The Mexican Ambassador in Argentina is disrespectful and ungrateful.

  36.   Arlex2014 said

    very good contribution thanks it helped me a lotooo I really appreciate it I needed the machine and I did not want to uninstall Linux because of the windows fart and so if I can play

    1.    Give us said

      hello you can also play on linux uu you just have to install a compatibility layer (wine) and have your Open GL graphic accelerator compiled :), also there are other ways greetings

  37.   Avern0s said

    Good explanation, I have tested it with Ubuntu 101.10 as host and XP as guest and Ok. By the way I have looked at something out there to put MAC OS X 10.6.7 guest with Virtual BOx OSe and with VM Ware but I have not been able.
    Have you done any tests on this? I have managed to download the MAC OS in ISO (already difficult to find) and install it but when starting it does not start, it gives me a kernel error.
    regards

    1.    Give us said

      17 Parts of MOSXSL-4GB
      http://adf.ly/Jk4KO

      X11 Extra Pack
      http://adf.ly/Jk4Ss

      Pass: manuel434

      I found it the first time 😛
      to install it you have to make a mess because you have to install the X11 to virtualize, there are many tutos in the network luckily

  38.   Let's use Linux said

    The truth is that I have not tried it. 🙁
    Let me know if you are successful and find out how to do it! 🙂
    Cheers! Paul.

  39.   Aristides said

    Hello friend, I liked your tutorial .. thank you for doing it .. I have a doubt, maybe you have a tutorial the installation of viartualbox for kali linux, please, Thank you very much .. I used your tutorial to install it thinking that it could be adaptable .. but it throws me this error.
    http://imageshack.us/f/42/be70.png/ Well, greetings, and thanks for your response and time.

  40.   yerzon said

    on linux mint 15 it doesn't work .. sudo apt-get install virtualbox-ose-qt

    1.    Give us said

      this tutorial is for ubuntu, Linux mint occupies another command line, they are linux but not the same, greetings 😛

  41.   let's use linux said

    That must be because there are no packages for the version of Ubuntu that Mint 15 is based on.
    Cheers! Paul.

    1.    Give us said

      (*) Sorry, but it cannot only be done by command line, since in the oracle download website you will find the download packages for various unix platforms.
      Ubuntu 13.04 ("Raring Ringtail") i386 | AMD64
      Ubuntu 12.10 ("Quantal Quetzal") i386 | AMD64
      Ubuntu 12.04 LTS ("Precise Pangolin") i386 | AMD64
      Ubuntu 11.10 ("Oneiric Ocelot") i386 | AMD64
      Ubuntu 11.04 ("Natty Narwhal") i386 | AMD64
      Ubuntu 10.04 LTS ("Lucid Lynx") i386 | AMD64
      Ubuntu 8.04 LTS ("Hardy Heron") i386 | AMD64
      Debian 7.0 ("Wheezy") i386 | AMD64
      Debian 6.0 ("Squeeze") i386 | AMD64
      openSUSE 11.4 / 12.1 / 12.2 i386 | AMD64
      SUSE Linux Enterprise Server 11 (SLES11) i386 | AMD64
      SUSE Linux Enterprise Server 10 (SLES10) i386 | AMD64
      Fedora 18 ("Spherical Cow") / 19 ("Schrödingers Cat") i386 | AMD64
      Fedora 17 ("Beefy Miracle") i386 | AMD64
      Fedora 16 ("Verne") i386 | AMD64
      Mandriva 2011.0 i386 | AMD64
      Mandriva 2010.0 / 2010.1 i386 | AMD64
      Oracle Linux 6 ("OL6") / Red Hat Enterprise Linux 6 ("RHEL6") / CentOS 6 i386 | AMD64
      Oracle Linux 5 ("OL5") / Red Hat Enterprise Linux 5 ("RHEL5") / CentOS 5 i386 | AMD64
      Oracle Linux 4 ("OL4") / Red Hat Enterprise Linux 4 ("RHEL4") / CentOS 4 i386
      All distributions i386 | AMD64
      and if you have to add the repositories in debian / ubuntu)
      deb http://download.virtualbox.org/virtualbox/debian raring contrib
      deb http://download.virtualbox.org/virtualbox/debian quantal contrib
      deb http://download.virtualbox.org/virtualbox/debian specify contrib
      deb http://download.virtualbox.org/virtualbox/debian oneiric contrib
      deb http://download.virtualbox.org/virtualbox/debian natty contrib
      deb http://download.virtualbox.org/virtualbox/debian maverick contrib non-free
      deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free
      deb http://download.virtualbox.org/virtualbox/debian karmic contrib non-free
      deb http://download.virtualbox.org/virtualbox/debian hardy contrib non-free
      deb http://download.virtualbox.org/virtualbox/debian wheezy contrib
      deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free
      deb http://download.virtualbox.org/virtualbox/debian lenny contrib non-free

      this is in /etc/apt/sources.list 🙂
      * apologizing for any interference that may serve them

      1.    Give us said

        If you want to install a usb2.0 you have to install Oracle VM VirtualBox Extension Pack for it to work, and you also need how to add network to my virtualbox 🙂 which is done in configuration / motherboard / boot order and network marks, then you go configuration / network / adapter n1 and you check if it is marked enable network adapter and that it is connected to NAT, then you check that the advanced options data is fine (you can connect network by LAN (marked cable connected) so you will have internet in your virtualbox

  42.   pepi said

    (͡ ° ͜ʖ ͡ °) jijijijiji

  43.   Francisco said

    menu, notice that I have a problem, install virtualbox with ubuntu 12.04 with guest and windows 7 as host, in ubuntu configure a mysql server now I want to connect from windows to ubuntu and it won't let me, do you know what network configuration I need to do?

  44.   Ana Chavez said

    Well in my case when in the terminal I put: sudo apt-get install virtualbox-ose-qt and I give it enter it asks for my password and after I put the password and I give enter it tells me:
    Reading the status information ... Done
    E: The virtualbox-ose-qt package could not be located
    and there I stayed and I did not know what to do please wait for an answer. and I would also like to know how you can help me to solve other problems such as that I cannot download any program from the internet and that I cannot watch videos

    1.    let's use linux said

      Ready! I already corrected it. The package is now called virtualbox-qt.
      Hug! Paul.

  45.   Manu said

    Very good post, for those who want to go deeper, here is a tutorial to create several virtual machines and configure a home network, this is very complete, step by step:

    http://guruofbit.com/tutorial-redes-linux-con-virtualbox/

  46.   VICTOR said

    Hello, good day I have a factory windows 8 lap and it took time to install virtual box and it let me be a virtual machine without problems but my hard disk broke down and I had to change it to now when the virtual machine starts but If I connect any usb device I get a blue screen with a little face and it restarts. I hope you can help me.

  47.   David said

    Here you have a guide in case the opposite happens to you, you want to configure VirtualBox in a Windows environment to virtualize a Linux distribution http://cursohacker.es/instalar-windows-en-virtualbox

  48.   Patricio Cancino A. said

    good tutorial, just and necessary

  49.   Rafael said

    I've had difficulties many times "I just know I don't know anything" but with Ubuntu you are lucky enough to find help like the one on this page, which gives you the opportunity to go from "I don't know anything" to knowing what this community is worth. graceaaasssss

  50.   jonathan said

    Hello friend, help me with something. Look, I'm new to this about Kali. I would like you to tell me what the hell is happening with my Kali.
    sudo apt-get install virtualbox-qt
    Reading package list ... Done
    Creating dependency tree
    Reading the status information ... Done
    Do not can instal some pack. This may mean that
    you asked for an impossible situation or, if you are using the distribution
    unstable, that some necessary packages have not been created or have
    been moved out of Incoming.
    The following information can help resolve the situation:

    The following packages have unmet dependencies:
    virtualbox-qt: Depends: virtualbox (= 4.1.18-dfsg-2 + deb7u3) but it will not install
    E: Problems could not be corrected, you have retained broken packages.

  51.   Augusto J. Echevarria Martinez said

    I have installed the virtual machine "VirtualBox", but it does not work for me, I only get error messages all over the place.
    Best regards,
    AugustoJ. Echevarria

  52.   maria said

    How do I install Ubuntu 14.10 on my virtual machine if it gives me this error? kernel driver not installed '/etc/init.d/vboxdrv setup'
    I need to do some urgent tests, thanks for your support.

  53.   Vicente said

    Thanks very good tutorial

  54.   guli said

    Thank you master, good data

  55.   ruben said

    How could I do when I turn on windows, it starts the virtual machine without me having to start it, it becomes automatic when starting the computer

  56.   Gianluca said

    Hello!
    I could already install the windows ... my question is the following:
    I would like to have both operating systems installed on the computer, instead of a virtual one inside the other. It can? How do I do it?
    Thank you very much, the tutorial is great.

    1.    let's use linux said

      Sure, that's called installing in "dual boot". That way, when you start the machine, a menu will appear for you to choose which operating system to start (Linux or Windows).

      My recommendation is that you look for a video on YouTube to do dualboot with your preferred Linux distro and Windows. It is the easiest and most intuitive way.

      Cheers! Paul.

  57.   Flavio gallegos said

    Interesting, good contribution, of course!
    Thank you very much.

  58.   Henry Ibarra Pino said

    Excellent contribution. Thank you very much.

  59.   fredy said

    Hello, I get an error when starting the machine. What can I do, I get this »FATAL: no bootable medium found! system halted. " what can i do, help please

  60.   antonio aguilar said

    after giving the instruction, no passwd entry for user apt get, as I solve it, by fa, I am starting with linux. thanks

  61.   John said

    What virtual machine systems recommend installing in linux to work in windows 7

    1.    lizard said

      virtualbox