How to create a virtual machine in VirtualBox

Once you’ve installed VirtualBox now it’s time to create a new virtual machine. If you haven’t installed VirtualBox already, you can follow a quick installation guide here.

In this guide on how to create a virtual machine on VirtualBox, we’ll be creating a virtual machine for Ubuntu, one of the most well-known and widely-used linux distro out there.

Downloading Ubuntu

To create a virtual machine for Ubuntu in VirtualBox, you first need to download a disk image file of Ubuntu. 

To download a disk image file of Ubuntu:

  1. Go to https://ubuntu.com/download/desktop
  2. Click on Download
  3. Save the file

Creating a new virtual machine

  1. Click on New on the top-center bar
  1. Type in Ubuntu in the name field, then click Next

NOTE: Make sure the Version is correctly set to reflect the bit of the OS you’re installing; in this case we are installing a 64-bit Ubuntu.

  1. If you have about 8GB of memory or higher, assign about 4GB to the virtual machine (You cannot allocate more than your host machine).
  2. Select Create a virtual hard disk now and click Create
  3. Select VDI (VirtualBox Disk Image) and click Next
  1. Select Dynamically allocated and click Next
  2. Set the file location and size and click Create

Selecting disk image file in settings

  1. Select Ubuntu and click on the Settings icon
  2. Go to the Storage tab, select the Empty disk icon, then click on the blue disk icon on the right
  3. After clicking on the blue disk icon, select Choose a disk file
  4. Find the Ubuntu disk image file that you’ve downloaded; if you’ve downloaded the Ubuntu desktop version 20.04.1 for amd 64, the filename should be ubuntu-20.04.1-desktop-amd64
  5. Once you’ve located the disk image file, select it and click Open
  6. In the Storage tab, under Controller: IDE, you will see the Ubuntu disk image file (ending in the file extension .iso); Click OK
  1. Once you’ve set the disk image file, you can click on the Start icon to boot up your Ubuntu virtual machine.

Leave a comment