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..
- What is Virtualization in Linux way?
- Types of Virtualization available in Linux/Unix
- Advantages of Virtualization
- What is KVM virtualization in Linux?
- KVM Virtualization: Find Hardware support KVM/VMware ESXi or not?
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.
Latest posts by Surendra Anne (see all)
- Online training on Linux Bash shell scripting - February 8, 2018
- 15 iostat command examples in Linux/Unix - December 4, 2017
- How to Installing and Configuring Firewalld on Linux - November 29, 2017
- 4 sleep command examples in Linux/Unix - November 2, 2017
- 5 SSH alias examples in Linux - October 16, 2017