KVM Installation on Ubuntu 12.1019 Apr 2013
In this post I’d like to do an introduction on how you can install KVM and the tools that allow you to easily run VMs. KVM - Kernel Virtual Machine is a Linux kernel module that enables the user space programs to use the hardware virtualization capabilities of Intel or AMD processors.
QEMU is a machine emulator that allows you to run instructions for specific architecture on your x86 CPU. It is also a virtualizer that executes the guest VM code directly on the hypervisor CPU, which is our use case providing almost native performance for the guest VMs.
The libvirt library provides an interface used for the KVM instances management.
bridge-utils allow you to bridge multiple ethernet devices and it will help you provide connectivity to your VM instances.
virtinst provides cli tools that allow you to create VMs
virt-manager is a graphical tool used for the VM management
The next step is to add our username to the libvirtd group:
At this time we should be able to start creating an instance. Let’s prepare the storage and the network our VM will use. For the storage we will create an emtpy image file of 5GiB size:
We will create a bridge called br0 and add eth0 wich is my laptop wired network interface to it. When created the VM should have an interface called vnet0 that is part of this bridge group:
Now let’s define our VM instance.
After this our install should be starting. You can use virt-manager to manage all the machines that are running on your local or remote hypervisor. It also allows you to access their consoles and adjust different parameters in the VM definition.