Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Ubuntu 20.04 - Install KVM

KVM

Related Posts

Check Compatibility

If you run the following command and get a number of 1 or more, you are fine:

egrep -c '(svm|vmx)' /proc/cpuinfo

Alternatively, do the following:

sudo apt-get install cpu-checker -y
kvm-ok

If you have problems, you may just need to enable virtualization in your BIOS/UEFI. VT-x (Intel) or AMD-V (AMD).

Steps

sudo apt-get install \
  qemu-kvm qemu-utils libvirt-clients bridge-utils libvirt-daemon-system virtinst

Add yourself to the libvirt group. It already added me by default, but good to do manually just in case.

sudo adduser $USER libvirt

Virtual Machine Manager

If you want a GUI application for managing your KVM guests, then install the virtual machine manager:

sudo apt install -y virt-manager

Taking It Further

Now that you have installed KVM, you may wish to use this helper script to set up some VMs.

Last updated: 9th August 2020
First published: 9th August 2020

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch