Melanie has a BS in physical science and is in grad school for analytics and modeling. She also runs a YouTube channel: The Curious Coder.
VirtualBox is easy to use software that allows you to use multiple operating systems simultaneously. As different operating systems have their pros and cons, using virtual machine software allows computer users the ability to have all the benefits!
Many video games are written to work with Windows only and Linux is well-known for its ease of use) and is extremely popular among programmers.) Because of this, many Windows users choose to install a Linux distribution on VirtualBox.
VirtualBox is also great for users who just want to try out a different operating system before committing to a day-long format! In fact, many VirtualBox users have a number of virtual machines installed for a variety of purposes whether it is just to try a new operating system, keep things organized/separated, or to hide files from others using their computer (as each virtual machine can be password-protected.)
This tutorial will show you how to install Ubuntu, one of the most popular Linux distributions, on your VirtualBox.
How to Install Ubuntu on Virtualbox
What You'll Need
Before we get started, you will need a few things to ensure that you are able to successfully install Ubuntu on your VirtualBox.
- VirtualBox: If you need help installing it, check out the tutorial on how to install VirtualBox.
- Hard drive space: You will need to have an idea of how much available space you have on your computer. This is so you know how large you can make your virtual machine. If you have Windows, open "My Computer" and look at how much space you have available on your (C:) drive.
- Ubuntu iso: You can download the latest version of Ubuntu here. You can either save the iso onto your computer or you can burn it as an image to a CD, it's your choice. This tutorial uses Ubuntu 11.04 (Oneiric Ocelot), but you can use any release. I also assume you've saved it to your computer.
Creating a Virtual Machine for Ubuntu
Once you've gotten everything together, you're ready to configure VirtualBox so that you can create an Ubuntu virtual machine. Open VirtualBox and you will be greeted by the Oracle VM VirtualBox Manager.
Since you will be creating a brand new virtual machine, click the button labeled "New." A window that says "Welcome to the New Virtual Machine Wizard!" will pop-up. Go ahead and click next.
The next window says "VM Name and OS Type."
In the name field, type a name for your machine. You can name it pretty much whatever you want. I usually name my computers and virtual machines with robot or dinosaur names, but a general rule of thumb is to include the name of the operating system in your virtual machine so you can quickly tell different virtual machines apart.
The area called "OS Type" is asking for which operating system you will be using. Select "Linux" from the drop-down menu labeled "Operating System." Under the drop-down menu labeled "Version" select "Ubuntu." Click next.
The next window will be called "Memory" and will ask you to select the base memory size. Just leave the recommended settings as they are and click next. The next window will be called "Virtual Hard Disk." It will show you the recommended size of the boot hard disk. Leave the default settings and hit next. You will be taken to the "Create New Virtual Disk Wizard" window where you will click next.
In the "Hard Disk Storage Type" window you will be asked to select either Dynamically expanding storage which starts out small and grows as you use up space or Fixed-sized storage where you will select the maximum amount of space allowed—you will not be allowed any additional space on the virtual machine. You can select whichever you want, if you're not sure which to select, the wizard offers some descriptions of each. This tutorial assumes you select fixed-sized storage. Click "next."
You will be taken to the "Virtual Disk Location and Size" window which asks how much space you would like to allocate to your virtual machine. The "location" area will be pre-filled with the information you gave in the previous steps, so leave it as is.
The "size" area is where we will use that information regarding how much space is left on your computer. Here you will decide how much space to give to your Ubuntu virtual machine. Don't give it less than 8GB of space as you won't have much room on it, but don't give it more space than you have on your computer. You also want to make sure you leave yourself room on your computer.
The computer used in the tutorial has 100GB of free space, so I will give my Ubuntu virtual machine 30GB of space. After you've decided how much space to give your virtual machine, click next.
The next screen will give you a summary of the steps you've taken. Click "finish" to start creating the hard disk. It may take several minutes for the hard disk to be created. When the wizard finishes creating the hard disk, another "Summary" window will pop-up. Click "finish."
After finishing the configurations, a "settings" window will pop-up. You can go through each of the settings and change things as you see fit. This tutorial assumes you've left everything as is.
On the left-hand side of the "Oracle VM VirtualBox Manager" screen, you will see your new virtual machine. Select your virtual machine and click the start button. A window titled "First Run Wizard" will pop up. Click next.
The next window will ask you to select the installation media. Click the little folder with the area and navigate to where you have the Ubuntu iso saved. Select the Ubuntu iso and click "open." Click next. The next window will give you a summary, click "finish."
Installing Ubuntu on Your Virtual Machine
Your virtual machine will boot, but you aren't finished yet. At this point, you do not yet have Ubuntu installed, you're just running off the iso. Because you're running off the iso, Ubuntu will seem really slow. The next steps will show you how to install Ubuntu onto your virtual machine
An "Install" window will pop up asking you which language you would like to install Ubuntu in and whether you would like to install Ubuntu or try Ubuntu. Select your language and click Install Ubuntu.
The next window will give you several recommendations and tell you whether or not you meet each. Make sure you meet each of the recommendations, such as being connected to the Internet as it makes the installation process much easier. Select "download updates while installing" and/or "Install this third-party software" if you wish and click "forward."
The next window will alert you that it did not detect any operating systems and will give you two options "Erase disk and install Ubuntu" (with a scary 'This will delete files on the disk' memo) and "Something else." Select "Erase disk and install Ubuntu" as the disk you created has no files on it... so losing those non-existent files is fine. Click "forward.
The next window will show you which drive you're formatting, click "Install Now." The installation process will take several minutes, but keep an eye on the machine as it will ask you simple questions (such as your time zone) while you format.
When the process is complete, a window saying "Installation Complete" will pop up. Click "Restart Now."
While the new operating system is rebooting, there will be a message saying "Please remove installation media and close the tray (if any) then press "ENTER". To do this, click "Devices" at the top of the window and hover over "CD/DVD devices". You should see a device with Ubuntu in the name with a checkmark next to it. Click this device to remove the checkmark, then press Enter.
You have successfully installed Ubuntu on a virtual machine using VirtualBox, congrats! Some final things you will want to do is run any updates in Ubuntu and install guest additions. Since updates automatically start up in Ubuntu (and can be found in Ubuntu's menu system) I'll just show you how to install the guest additions.
In your Ubuntu virtual machine window, click "devices" then click "install guest additions." Click "okay" on the window that pops up, then click "run" in the next window. The installation process may take several minutes. When the installation is complete, it will say "press return to close this window" so go ahead and hit "enter."
You are ready to use your virtual machine. Whenever you want to access it, just open up VirtualBox, select your virtual machine and hit "start." Enjoy your Ubuntu virtual machine!
This article is accurate and true to the best of the author’s knowledge. Content is for informational or entertainment purposes only and does not substitute for personal counsel or professional advice in business, financial, legal, or technical matters.
© 2011 Melanie Palen
navve on April 01, 2019:
فرشاد بندی on January 18, 2019:
persson on August 26, 2017:
the vm keeps saying fatal: no bootable medium found, halting system
Casey Strouse from Phoenix, Arizona on February 12, 2012:
I use VirtualBox to run a Windows 7 testing environment on my Mac for testing websites as I develop for clients.
Melanie Palen (author) from Midwest, USA on July 13, 2011:
Thank you for the great tip! I am not a Windows 7 user, so I didn't know that! That's definitely important to know!
Jeroen Schouten on July 13, 2011:
IMPORTANT! If you use the ISO from your HD and don't burn it to CD, in Windows 7 you will need to start VirtualBox as administrator, or the install of Ubuntu will fail.
Hello, hello, from London, UK on June 23, 2011:
Thank you for a great, informative hub.