Install Linux KVM on Ubuntu

Linux KVM is virtualisation software that allow you to create virtual machine under linux. To install on Ubuntu, run

apt install -y qemu-kvm qemu-utils

Install libvirtd, this allow you to easily create KVM virtual machines and allow remote connection from virt-manager GUI application.

For Ubuntu 20.04

apt install -y libvirt-daemon libvirt-daemon-system

For Ubuntu 18.04

apt install -y libvirt-bin

Enable and start libvirt

systemctl enable libvirtd
systemctl start libvirtd
systemctl is-active libvirtd
systemctl status libvirtd

At this stage, you should be able to connect to KVM server form your computer using virt-manager.

You need to create a bridge network interface (“br0”), for this, follow instructions at Linux KVM Bridge network on Ubuntu.

Downloading ISO

Before you can setup any VM, you need to download ISO image for the OS. Here i downloaded ISO image for Ubuntu 19.04

cd /var/lib/libvirt/images
wget http://mirrors.piconets.webwerks.in/ubuntu-mirror/ubuntu-releases/19.04/ubuntu-19.04-live-server-amd64.iso

Once downloaded, you should be able to select this ISO image in virt-manager when creating a VM.

See Linux KVM

Comments

Leave a Reply

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