How To Install Ubuntu 21.04 With A Virtual Machine

computer codes

computer codes

Ubuntu 21.04, nicknamed “Hirsute Hippo” was released in April 2021. The Ubuntu family of operating systems is renowned for its stability and ease of use, and Hirsute Hippo is no exception. 

But it’s always better to test it on your existing operating system before installing it as a primary or secondary operating system. 

There’s even a more recent version of Ubuntu for you to consider installing – the 22.10 version that will continue being updated till July 2023. 

The installation requirements for 21.04 and 22.10 are the same, and it’s always better to stick to a newer version.

In this brief guide, we will walk you through testing either of these operating systems using VirtualBox, which is a virtualization software. It enables running more than one operating system, or “virtual machine,” on one physical machine.

Creating a Ubuntu 21.04 or 22.10 virtual machine, or a VM of any other Linux distro involves the same steps.

Step #1: Launch VirtualBox 

Installing VirtualBox is quite straightforward on any operating system. You can visit the downloads page on the official site and get the installation files you need to run.

On Linux, you can run the following commands to install the software on your machine:

$ sudo apt update

$ sudo apt install virtualbox virtualbox-ext-pack


If you’re running Ubuntu, you can install the newest version of VirtualBox via the Oracle VirtualBox repository. Let’s say you’re running Ubuntu 20.04. You must run the wget command, like so:

$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add –

$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add –


Remember that you can find builds for specific operating systems on the official download page.

The command should give you the “OK” output, indicating that the machine has imported the keys. Next, you must add the VirtualBox APT repository to your machine like so:

$ sudo add-apt-repository “deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib”


If you see an “add-apt-repository” error that says it couldn’t find the command, you must install the software-properties-common package to proceed.

When the repository is finally enabled on your machine, installing VirtualBox is as straightforward as installing any other application. You can run:

$ sudo apt update

$ sudo apt install virtualbox-6.0


All that’s left to do is to install the VirtualBox Extension pack, and you can begin testing whichever Linux distro you choose on your machine. Installing this pack is essential since it offers a laundry list of helpful functions for virtual machines. 

With this pack, you can connect USB devices directly to the virtual machine – bypassing your operating system. It also offers RDP support and several other helpful features. 

Install the pack on your machine with the following command:

$ wget https://download.virtualbox.org/virtualbox/6.0.0/Oracle_VM_VirtualBox_Extension_Pack-6.0.0.vbox-extpack


Remember to match the extension pack version with the version of VirtualBox you installed. Run the following to import the extension pack:

$ sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.0.0.vbox-extpack


After running this command, you will need to accept the terms of the Oracle license. You will see the following prompt and must enter “y”:

Do you agree to these license terms and conditions (y/n)?


The terminal will show you the installation progress before indicating that the extension pack has been installed.

Step #2: Download the Required ISO 

You can find the ISO file of all Ubuntu versions, including the Hirsute Hippo OS, on the Ubuntu website. On Linux, you can also run the following command to grab the ISO:

wget https://releases.ubuntu.com/21.04/ubuntu-21.04-desktop-amd64.iso

Step #3: Create a Virtual Machine

Launch the VirtualBox app, hit “New,” and assign a name to the virtual machine you want to create. It’s best to name the virtual machine after the operating system you are adding.

Proceed, and you will see a slider that assigns RAM to the VM you create. Use it to assign four gigabytes of RAM to the VM. You must assign at least one gigabyte for the VM to work.

Next, you must create a virtual hard disk. The process begins by choosing the type of hard drive you want to make. We choose the default VDI hard drive in this guide. 

Choose the “dynamically allocated” hard disk scheme, which is the default scheme. Finally, choose the volume of space you want to assign to this virtual machine. 

Step #4: Use the ISO File

Select the VM you just created and hit Ctrl+S. The settings wizard will appear, where you must right-click the VM and choose “Settings.”

Next, click the Folder and then “Add.” Choose the Ubuntu 21.04 ISO file from the window that appears and hit the “Choose” button. 

Finally, start the VM, and hit the Enter button on your keyboard to start booting the OS.

Bear in mind that the minimum system requirements for Ubuntu 21.04 and 22.10 are:

2 GHz dual-core processor
25 GB of hard-drive space
4 GiB RAM (system memory)
CD/DVD drive or a USB port for the installer media
Internet access is required but not mandatory for installation
VGA capable of 1024×768 screen resolution

 

Step #4: Install the Distro

If you’re following along with the tutorial and installing Ubuntu 21.04, at this stage, you will see an installation wizard. To proceed, you must hit the “Install Ubuntu” button and follow the wizard. You will need to set up things such as your keyboard layout, the language of the OS, and the time zone. 

After some basic setup, you must choose between the minimal and normal installation. If you want to use the open-source office suite, games, and other apps on the machine, choose the normal or full installation. 

The minimal installation will not install any of these apps and will only give you the operating system to work with.

Next, you must pick a virtual hard disk to install the operating system on. Since you’re using VirtualBox, you will see only one of these disks. Choose the default option and hit “Install Now.”

The OS will finally be installed on the VM, and you can test its stability and functionality.