You are here: Home » Blog » VirtualBox – Install Ubuntu Linux on Windows 10

VirtualBox – Install Ubuntu Linux on Windows 10

VIrtual Box

In this particular article, I am using Windows 10 as my host operating system ℹ️ and Ubuntu ℹ️ as my virtual machine’s operating system. So basically we will be installing Ubuntu 20.04.2.0 LTS on a virtual machine created using VirtualBox 6.1 (Version 6.1.18 r142142 (Qt5.6.2)) running on Windows 10 Pro 64-bit. Even if you try this with some other operating system or different software versions this post will definitely guide you and can be used as a reference. All the software versions mentioned are latest as of 15/02/2021.

Pre-requisites

  1. Oracle VM VirtualBoxDownload this software from their official website.
  2. Operating SystemDownload Ubuntu from their official website.
  3. Virtualization Enabled (Check the FAQ section for more details)

VirtualBox Installation steps

  1. Install VirtualBox software on your Windows 10 computer and then open the software.
  2. Click on New that we can see on top of the software. This will start a wizard which will guide us through the process of creating VM (Virtual Machine).
  3. Here we need to give some details,
    • Name – This is where we give some name to our virtual machine.
    • Machine Folder – This is to specify the path where VirtualBox will create and store the virtual machine.
    • Type – This is to select the type of operating system we will be installing/running on this virtual machine, in our case, we will select Linux ℹ️.
    • Version – Here we will select the version/flavour of the operating system, in our case, we will select Ubuntu (64-bit) ℹ️.
  4. After this, we need to allocate some RAM to our virtual machine. We will have a slider that shows three sections green, orange & red. The Green section indicates a safe value of RAM that we can allocate. The Orange section is where you are allocating more RAM to the virtual machine and in turn, you are gonna slow down your actual computer. The red section indicates that any value of RAM that we allocate from here will definitely slow down your computer and your system might not work properly or might even crash. So allocate a minimum of 2048 i.e. 2 GB of RAM and maximum of what is shown in the green section for your computer ℹ️. I am going to proceed with 4096 i.e. 4 GB of RAM for my virtual machine.
  5. Once the RAM is allocated next thing is about storage i.e. hard disk. We can choose to create a virtual machine without a hard disk, we can choose an existing hard disk ℹ️ or we can create a new hard disk. So let’s select create a new virtual hard disk now and proceed.
  6. VirtualBox gives you an option of creating three types of virtual hard disks ℹ️,
    • VDI (VirtualBox Disk Image) – VDI is the native format of VirtualBox. Other virtualization software generally doesn’t support VDI.
    • VHD (Virtual Hard Disk) – VHD was developed by Microsoft for Virtual PC.
    • VMDK (Virtual Machine Disk) – VMDK was designed by and for VMware, but VirtualBox and QEMU (another common virtualization software) also support it. This format might be the best choice for you because you want wide compatibility with other virtualization software. VMDK also supports incremental backups. Incremental backups copy only the data that was changed after the previous backup instead of copying all of the data. This feature makes backing up data more efficient and quicker as compared to VHD and VDI, which do not support incremental backups. VMDK additionally supports splitting storage files less than 2 GB each, which may help overcome low file size limits.
  7. We need to make a note that all three file types are interconvertible, so they allow portability to other virtualization software. In our case, we are going to stick to the native format i.e. VDI and proceed with it.
  8. Next, we need to choose if we want our virtual hard disk to be,
    • Dynamically allocated – The virtual hard disk will grow as it is used (up to its maximum fixed size that we allocate in the next step). Once it grows it will not shrink automatically when the space on the hard disk is freed. This type is slower as compared to the fixed size because of its nature. Prefer this when you are short on storage and speed is not a concern.
    • Fixed size – The virtual hard disk will be created to its maximum size instantly. This type is fast as compared to the Dynamically allocated type for obvious reasons that its created and it need not be expanded in the runtime. Prefer this if storage is not a concern for you and you want your virtual machine to work faster and smoother.
  9. Allocate the maximum fixed size for the hard disk. I am creating a hard disk of fixed size and 10 GB.
  10. Now your virtual machine is created and we need to insert some installation/boot media into this new machine so that it can start. To do this, click on settings of the virtual machine go to storage and under controller: IDE we will see Empty, click on this and on the right side we will have a Attributes section. Under this section in front of the Optical Drive, click on the small blue disk and click on Choose a disk file (Refer to the screenshots or the video). Select the Ubuntu ISO file and now we have inserted the installation media into the virtual optical drive of our virtual machine.
  11. Start the virtual machine with the option given on the top and select the ISO file again from the Select start-up disk option. After clicking on the start option the virtual machine will boot from this installation media.
  12. If everything is proper we should see two options Try Ubuntu and Install Ubuntu. Click on Install Ubuntu and proceed.
  13. After that, select the proper keyboard layout, click on next and in the Updates and other software configure according to your need. I am going to select Normal installation and select both the options present in others section. This will install some third-party software and also will download the latest updates for Ubuntu. If you want to save installation time or you don’t have an internet connection i.e. your virtual machine is offline proceed by un-checking the option of download updates and install third-party software. This can be manually done later.
  14. Next, we need to select the installation type. Here we can either select Erase disk and install Ubuntu or Something else. If you want to do the advanced installation like create partitions etc you can go with Something else and configure it. For a simple installation, we will proceed with Erase disk and install Ubuntu.
  15. After that, we will select the timezone, fill in all the personal details like Name, Computer’s Name, Username, Password and proceed with the installation of the operating system.
  16. Once the installation is finished you will have to restart the virtual machine and when the virtual machine prompts to remove the installation medium just check in the settings of the virtual machine if the Ubuntu ISO that we had inserted in the optical drive is removed or not. So basically the optical drive has to be empty just like before. VirtualBox will by default remove it for you but it’s better to cross-check. After that press Enter button and voila you should see the login screen of Ubuntu!
  17. So now you have successfully installed VirtualBox, created a virtual machine and installed Ubuntu! Congratulations!

Video Demonstration - VirtualBox

Frequently Asked Questions (FAQ) - VirtualBox

How to check if virtualization is present and if it’s enabled?
Open command prompt in the admin mode and type systeminfo, after that cmd will display some info about your system. At the end check if something like the following is displayed or not. If you can see this it means that your computer supports virtualization. Now check if Virtualization Enabled In Firmware is yes or no. This indicates if it’s enabled in the BIOS or not. If this is no you need to go to BIOS and enable it ℹ️. Make sure you don’t mess with any other settings in the BIOS as it might cause some serious issues with your computer.

Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
                           Virtualization Enabled In Firmware: Yes
                           Second Level Address Translation: Yes
                           Data Execution Prevention Available: Yes

How to make the virtual machine full screen?
Press Right Ctrl + F and your virtual machine will become full screen. Use the same key combination to come out of the full-screen mode. After getting into the full-screen, click on the ubuntu settings and in the display section change the resolution. This will make sure that your virtual machine uses the complete screen space in the full-screen mode. (Refer to the video’s end for a live demonstration of this functionality)

Do we need hardware virtualization to run VirtualBox?
If you are using VirtualBox 6.1 – Yes. But you can still use older versions of VirtualBox to create virtual machines on a computer that does not support hardware virtualization. This is possible because older versions of VirtualBox used to use software virtualization. Refer to this wiki section for more details on this topic or drop a comment specific to your query and we can figure it out.

Feel like sharing something...?