Ubuntu Server 22.04 on VirtualBox

If you don’t already have VirtualBox installed, you can follow this tutorial. It should be possible to follow even if you have a different operating system than Windows 11.

Ubuntu Server can be downloaded from https://ubuntu.com/download/server

While it is downloading, you can start by creating the virtual machine for the Ubuntu Server. Click on “Machine” and choose “New

Give a name to the virtual machine and choose where to store it. Under “Type” select “Linux” and under “Version” select “Ubuntu (64-bit)

Choose memory size, 4GB of RAM is a good choice if you might use the desktop interface and want good performance.

You want a virtual hard disk for storage, so choose “Create a virtual hard disk now

Choose “VDI (VirtualBox Disk Image)” for use in VirtualBox, read up on the other formats here

Choose “Dynamically allocated
(Fixed size might be the appropriate choice if the virtual server will be introduced in a production environment without access to a storage pool.)

Allocate virtual space for the server accordingly, 30GB is more than enough for now.

Under “Storage” click on the line where it says “[Optical Drive]” and “Choose a disk file

Choose the Ubuntu Server iso file you downloaded

Let’s start up this virtual machine, click on the green arrow at the top where it says “Start

Navigate with the arrows and choose “*Try or Install Ubuntu Server” then hit ENTER

Select your preferred language, navigate with the arrows, and then hit ENTER

Make changes if you don’t use an English keyboard, navigate with the arrows and TAB, then make sure “Done” is green and hit ENTER

Choose the server appropriate for your use, then make sure “Done” is green and hit ENTER

If you don’t want to use the network identified, make the changes needed, then make sure “Done” is green and hit ENTER

Configure the proxy here if you want to – this can be skipped!
Make sure “Done” is green and hit ENTER

No changes are needed, you can let the system know where to fetch packages from.
Make sure “Done” is green and hit ENTER

As a default, the “Use an entire disk” and “Set up this disk as an LVM group” is selected. Make changes as needed or leave it as is. Read up on what LVM group is here.
Make sure “Done” is green and hit ENTER

Check that the summary is according to your needs. Then make sure “Done” is green and hit ENTER

Mark “Continue” with red and hit ENTER

Create a user with a password, and give the server a name. Then make sure “Done” is green and hit ENTER

Choose whether or not to install SSH for remote access to the server. Then make sure “Done” is green and hit ENTER

Select packages to install, if any. Then make sure “Done” is green and hit ENTER

When the installation is complete, make sure “Reboot Now” is green and hit ENTER. The machine will reboot and may ask you to remove the installation disk (the iso file) and then hit ENTER again.

When the machine has rebooted, log in with the username and password you created during the installation process. Notice that the password will not be visible.

Let’s update the system. Run the command: ‘sudo apt update’ and write the password

Then install the packages by running the command ‘sudo apt upgrade’, write ‘y‘ and hit ENTER to continue

Install VirtualBox Guest Additions by running the command ‘sudo apt install virtualbox-guest-additions-iso virtualbox-guest-utils virtualbox-dkms

Write ‘y’ when asked to continue

You now have an updated version of Ubuntu Server installed with VirtualBox Guest Additions in Oracle VM VirtualBox.

Additionally, you might want to change the password for root.
Run the command ‘sudo -i’ and write the user’s password.
You have now switched from your user to root.
Run the command ‘passwd’ and write the new password twice.

To restart the machine run the command ‘reboot’ or ‘init 6
To shutdown the machine entirely run the command ‘init 0’


Canonical Ubuntu Server: https://ubuntu.com/download/server
Canonical Ubuntu Server Docs: https://ubuntu.com/server/docs/install/storage
VirtualBox User Manual Disk Image Files: https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/vdidetails.html
All images: Solberg, 2022