Install Ubuntu 20.04 Server on KVM

Ubuntu Server on KVM

In this tutorial, we will review the installation procedure for standing up an Ubuntu 20.04 server on KVM. We will focus specifically, on version 20.04 of the OS. However, these instructions will work for installing older or newer versions of the Ubuntu OS provided you have access to the .iso file. Having said that, it is important to note here that Ubuntu 20.04 will reach end-of-life (EOL) on April 2025.

Table of Contents

This means that Ubuntu 20.04 will receive security updates and critical bug fixes from Canonical, the company that develops Ubuntu, until that date.

After April 2025, Ubuntu 20.04 will no longer receive security updates or support from Canonical. This could potentially leave your system vulnerable to security risks, so it is recommended to upgrade to a newer version of Ubuntu or to an LTS version that is still supported by Canonical.

It is also worth noting that there is an extended security maintenance (ESM) program for Ubuntu 20.04 that provides security updates for an additional three years beyond the end of life date, but this requires a paid subscription to the Ubuntu Advantage program.


The process of installing Ubuntu 20.04 server on KVM (Kernel-based Virtual Machine) using the command line interface is pretty straightforward. This article will outline the steps.

Ubuntu 20.04 server on KVM

Image by Panumas Nikhomkhai from Pexels

Ubuntu 20.04 server on KVM: Installing KVM

The process of installing Ubuntu 20.04 server on KVM (Kernel-based Virtual Machine) using the command line interface is pretty straightforward. This article will outline the steps.

First, make sure that your system has KVM installed. There are several articles at that go into detail about the KVM installation on various Linux distributions (See suggested articles below). This article will provide a more abbreviated version and an alternate way to install Ubuntu 20.04 server from the command-line (CLI) or the terminal.

To install KVM or check if it’s installed, run the following command in the terminal.

					$ sudo apt-get install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virtinst cpu-checker

Creating a Virtual Machine (VM)

Once KVM is installed, create a new virtual machine by running the following command.

					$ sudo virt-install --name=ubuntu20.04 --memory=2048 --vcpus=2 --cdrom=/path/to/ubuntu-20.04.iso --disk size=20 --os-variant=ubuntu20.04 --graphics none --location=/dev/cdrom --network bridge=br0 --console pty,target_type=serial

Replace /path/to/ubuntu-20.04.iso with the actual path to the Ubuntu 20.04 server ISO file on your system.

In the above command, we are creating a virtual machine named “ubuntu20.04” with 2GB of RAM and 2 vCPUs. The ISO file is mounted as a CD-ROM, and a 20GB disk is created for the virtual machine. We are using the --os-variant=ubuntu20.04 option to specify the operating system variant, and the --graphics none option to disable graphical interface. We are also using the --network bridge=br0 option to attach the virtual machine to a bridge network called “br0”. Finally, we are using the --console pty,target_type=serial option to enable the serial console for the virtual machine.

Completing the Install and Accessing the VM

Press Enter to start the installation process. The installer should launch and you can proceed with the Ubuntu 20.04 server installation as you would on a physical machine.

Once the installation is complete, the virtual machine will automatically reboot. You can then log on to the virtual machine using the console by running the following command.

					$ sudo virsh console ubuntu20.04


That’s it! You have successfully installed Ubuntu 20.04 server on KVM. Was this article helpful to you? If so, leave us some feedback in the comments section. We’d love to hear from you.


Related Posts

Install CentOS8 on KVM
Install CentOS8 on KVM

In today’s tutorial, we will install CentOS8 on KVM. The install process is fairly straightforward and we will cover it here step-by-step. We will follow

Read More »

Leave a Reply

Your email address will not be published. Required fields are marked *