woo-hoo..! we are at the practical posts on KVM virtualization now. From this post on words we will see on how to install KVM hypervisor and use it to the maximum with commands as well as GUI tools. Till this point we seen some basics such as..

Let us start with KVM hypervisor in Ubuntu/Debian Linux operating system.

Step1: Before installing KVM(Kernel Virtual machine) hypervisor we have check if our hardware support or not. Click here to know if your hardware support KVM or not.

Step2: If the hardware supports, install KVM virtualization with following command as a normal user.

sudo apt-get install virt-manager ubuntu-virt-server python-vm-builder

What actually the above packages do?

virt-manager: This is graphical KVM virtual machine manager which is very handy in configuring VM’s. We can use this virt-manager to connect to remote KVM hypervisors too. This is similar to VMware vCenter server where we can manage multiple VMware ESXi/ESX servers from single point. We can even clone/migrate from one hypervisor to other without much issues.

ubuntu-virt-server: Core KVM package for managing VM’s through /dev/kvm file for interacting with direct hardware. This package contains KVM, libvirt-bin etc.

python-vm-builder: This is a python based VM builder software which is useful in building VM images and very much useful in Cloud automation tools like Eucalyptus.

Step3: Once we install the mention software’s make sure that your user account belongs to libvirtd group. This will help us do KVM activities as normal user and reduce the usage of root user access.

sudo usermod -G libvirtd linuxnixcom

I added libvirtd as my secondary group to my login linuxnixcom.

Step4: Check if libvirtd service is started or not.

ps -ef | grep libvirtd

Step5(optional step): If libvirtd service is not at started use below command -d option so that it will start as daemon.

sudo /usr/sbin/libvirtd -d

Step6: Once the service is started we can run virt-manager command to start virtual machine manager



Once if you see virtual machine manager without any error that shows KVM hypervisor installed successfully. In our next post on how to install KVM hypervisor in Redhat/CentOS/Fedora based machines.

The following two tabs change content below.
Mr Surendra Anne is from Vijayawada, Andhra Pradesh, India. He is a Linux/Open source supporter who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. He works as Devops Engineer with Taggle systems, an IOT automatic water metering company, Sydney . You can contact him at surendra (@) linuxnix dot com.