In the following article, we will learn how to install KVM on Manjaro Linux. KVM stands for Kernel-based Virtual Machine which allows us to run multiple guest operating systems on a single host. KVM is an Open-source technology that lets us turn our Linux machine into a Hypervisor. This allows us to run multiple Virtual Machines (VMs). The KVM converts Linux into a (bare-metal) hypervisor. We can install KVM on the recent Linux distribution such as Ubuntu, Arch, Manjaro, Fedora and so on.
Steps to Install KVM on Manjaro Linux
In this article, I am using Manjaro Linux version 21.0.2. You can download the ISO from the following link if you need.
Step 1. Check the Hardware Compatibility
First, we need to make sure that our PC supports the hardware required by KVM to run properly. You can run KVM on an Intel or AMD PC as long as it support virtualization. To do this, open Konsole or Terminal and then run this command
LC_ALL=C lscpu | grep Virtualization
Make sure you see the output such as Virtualization: VT-x (Intel processor) or Virtualization: VT-x (AMD processor). If the output is not one of them, then your PC does not support virtualization and we cannot install KVM on it.
Step 2. Checking Kernel Support
Now we need to check the Kernel support on our system. Please use the command below to check
zgrep CONFIG_KVM /proc/config.gz
It should display something like this
Step 3. Install KVM on Manjaro
Use the following command to install KVM and all the dependencies.
sudo pacman -S virt-manager qemu vde2 ebtables dnsmasq bridge-utils openbsd-netcat
Wait until the installation completes. It took some times depends on your internet connection speed.
Step 4. Enable the libvirtd Service
It is important to enable the service. Otherwise the KVM will not working properly
sudo systemctl enable libvirtd.service
Step 5. Start the libvirtd Service
Now we can start the libvirtd service with this command
sudo systemctl start libvirtd.service
Step 6. Configure KVM
This is an important step so please do not skip this one. We need to edit the libvirtd.conf. I use nano to edit this file.
sudo nano /etc/libvirt/libvirtd.conf
Now uncomment the following line
#unix_sock_group = "libvirt"
Change it to :
unix_sock_group = "libvirt"
Also, we need to uncomment this line
#unix_sock_ro_perms = "0777"
Change it to
unix_sock_ro_perms = "0777"
Close and save the file.
Step 7. Run Virtual Machine Manager
Now we are ready to create our first virtual machine. Open the Virtual Machine Manager from the Application menu.
Now you can try to create a new virtual machine using the Virtual Machine Manager. Thanks for reading this article and see you next time.