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:
- Go to https://ubuntu.com/download/desktop
- Click on Download
- Save the file
Creating a new virtual machine
- Click on New on the top-center bar
- 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.
- If you have about 8GB of memory or higher, assign about 4GB to the virtual machine (You cannot allocate more than your host machine).
- Select Create a virtual hard disk now and click Create
- Select VDI (VirtualBox Disk Image) and click Next
- Select Dynamically allocated and click Next
- Set the file location and size and click Create
Selecting disk image file in settings
- Select Ubuntu and click on the Settings icon
- Go to the Storage tab, select the Empty disk icon, then click on the blue disk icon on the right
- After clicking on the blue disk icon, select Choose a disk file
- 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
- Once you’ve located the disk image file, select it and click Open
- In the Storage tab, under Controller: IDE, you will see the Ubuntu disk image file (ending in the file extension .iso); Click OK
- Once you’ve set the disk image file, you can click on the Start icon to boot up your Ubuntu virtual machine.