Install Ubuntu on VirtualBox

Have you ever wanted to try Ubuntu but didn’t have a spare computer to run it on? This tutorial will show you how a virtual machine like VirtualBox will let you play with other operating systems without having to change what’s on your computer right now. The tutorial will cover how to install VirtualBox and set up your first virtual machine, show you how to get Ubuntu and prepare for installation, and walk you through an installation of Ubuntu.

Steps

Getting Ubuntu

  1. Go to the home page on Ubuntu's website and then go to the download section.
  2. Select the proper architecture from the drop-down box.
  3. Click the “Begin Download” button to start downloading Ubuntu (gnome).

Installing VirtualBox

  1. Download the latest version of VirtualBox. Go the VirtualBox website and go to the download section. There are versions available for Windows, Mac, and Linux. If you’re not sure what operating system you’re running, download the Windows version at the top by clicking “x86/amd64”.
  2. Start the installation. Read and accept the license agreement. Newer version of installers i.e. 4.3.16 released on "09 September 2014" does not show license agreement option while installing.
  3. Choose the “I accept” option and click “Next” to continue.
  4. Choose not to install USB support, networking, or Python support. Do this by clicking the grey icon near each option and selecting the red X or “Entire feature will be unavailable”. Then click “Next” to continue. If this is your first time dealing with virtual machines, this will eliminate the need to install custom drivers, which makes installing and uninstalling VirtualBox easier. If you’ve worked with virtual machines before, you can choose to keep these options selected.
  5. Deselect the Quick Launch Bar checkbox and click “Next” to continue.
  6. Click “Install” to install VirtualBox.
  7. Click “Finish” to open VirtualBox.

Creating A New Virtual Machine

  1. In VirtualBox, click the “New” button to start the virtual machine wizard.
  2. Give your virtual machine a name and select the operating system you’ll be running. Click “Next”. For this example, you’ll be installing Ubuntu.
    • Type any name in the Name field (such as Ubuntu or Linux). For “Operating System,” choose “Linux.” The version will automatically default to “Ubuntu.” Click “Next” when you’re done.
  3. Select the amount of memory your VM will use and click “Next.” When you chose your operating system in the previous step, VirtualBox automatically recommends the proper amount of memory to use. If you feel this amount isn’t correct, you can move the slider or type a new amount in the box. Click “Next” when you’re done.
  4. Click “Next” to create a new virtual hard disk, then click “Next” again. This opens a second wizard to create a new virtual hard disk.
  5. Select either "Fixed-Size Storage" or "Dynamically Expanding Storage" depending upon your needs. A fixed size storage is going to be the size of the virtual hard disk on the host OS (e.g.: a virtual disk 8 GB will be 8 GB on the host OS's hard disk). A dynamically expanding storage will be only the size of Ubuntu on your hard disk, but will grow in size as files are added to it until it reaches its limit (e.g.: virtual disk is created and has a 1 megabyte file on it. The size of the virtual disk is 1 megabyte. Then, another 1 megabyte file is added. The size of the virtual disk is 2 megabytes. This goes on until it reaches the specified size of the disk).
  6. Click “Next” to accept the default name and size of the virtual hard disk. Again, VirtualBox recommends the proper size of your virtual hard disk. If you feel this amount isn’t correct, you can move the slider or type a new amount in the box. Click “Next” when you’re done.
  7. Click “Finish” and wait while VirtualBox creates the new virtual hard disk. You will see your new virtual machine in list.

Setting The CD To Start

  1. Select your new virtual machine. Once you've done this, click the “Settings” button.
  2. Click “Storage” tab.
  3. Click the “CD/DVD icon" having "+" on it and select ISO to mount
  4. Ubuntu ISO will be mounted under controller device.
  5. Click on the system tab on the left. Choose boot order and keep CD/DVD on the top as first priority.
  6. You may now close the settings window and return to the main window. You ubuntu machine is ready to boot now.

Installing Ubuntu

  1. Select your virtual machine. Then click the “Start” button
  2. Ubuntu Virtual machine will start in a separate window.
  3. Machine will boot from selected ISO and you will see language option. Choose your preferred language and press Enter.
  4. In next window you will see "Install Options". You can choose to try ubuntu without installing, you can choose install ubuntu option, you can also check for disk and memory for defects and problems and you can also choose to boot from existing hard disk. Choose to INSTALL ubuntu option here.
  5. Once ubuntu has loaded, Choose your language and Click “Continue".
  6. On next screen, ubuntu will give you a checklist and you will be asked if you need to update during install. Choose your required option and click "Continue".
  7. Next option will ask you if you want to delete all data and install or you can also choose or create your own partitions from option "Something Else".
  8. Select your time zone from the map, then click “Continue.”
  9. Click “Continue” to keep the default keyboard layout or choose your desired one.
  10. Type your username in the first text box. This will automatically fill in the login name and computer name. Type your password and confirm your password and click "Continue".
  11. Ubuntu will begin the installation now.
  12. Once installation is complete, click “Restart Now” to finish installation.
  13. Machine will restart and Installed Ubuntu will load from hard disk, provide password to username and login to main window of ubuntu.

Installing Guest Additions

  1. Once you have logged in to Ubuntu, click on the "Devices" tab in virtualbox. Select "Insert Guest Additions CD Image...".
  2. When Ubuntu asks to install a program and it needs a password, type your user password. Click "Install Now."
  3. Let the terminal program run, and when it has finished, press Enter.
  4. Reboot your VM and once it has booted, click on the "View" menu, and click "Auto-resize Guest Display" and you will now have a full-resolution Ubuntu VM on your computer.



Tips

  • You may need to enable the Virtualisation technology from the BIOS menu of your home machine, before the Virtual machine will run successfully. If this is not done the error message "This kernel requires an x86-64 CPU, but only detected an i686 CPU. Unable to boot – please use a kernel appropriate for your CPU" will show when the Virtual Machine starts up. Otherwise, try installing the 32-bit version of Ubuntu.
  • If you did not install the USB driver, every time you look at the settings for a virtual machine, you’ll get a warning saying VirtualBox failed to access the USB subsystem. This is normal and will not affect your virtual machine. Just click “OK” to move on.
  • When you give focus to your virtual machine, VirtualBox automatically connects your keyboard to the virtual machine. To release your keyboard, simply hit the Right Ctrl key.
  • When you click inside a virtual machine, VirtualBox automatically connects your mouse to the virtual machine. To release your mouse, simply hit the Right Ctrl key.

Warnings

  • Make sure your hard disk has enough space to create the virtual hard disk. If VirtualBox suggests you need an 8 GB virtual hard disk, make sure you have more than 8 GB of free space on your computer.

Related Articles

  • Install Virtual Machine Additions
  • Create an Ubuntu Virtual Machine with VirtualBox (Mac)