How To Install KVM on Manjaro 21

Install KVM on Manjaro 21

In this tutorial, we will show you how to install KVM on Manjaro 21. For those of you who didn’t know, KVM stands for Kernel-based Virtual Machine which allows us to run multiple guests 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. Implementations of KVM are supported on the x86 platforms (32-bit and 64-bit) that support virtualization CPU extensions (such as those provided in Intel VT and AMD-V lines). The only exceptions are the Atom processor from Intel.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you through the step-by-step installation of the KVM on a Manjaro 21 (Ornara).

Install KVM on Manjaro 21 Ornara

Step 1. Before running the tutorial below, make sure that our system is up to date:

sudo pacman -Syu

Step 2. Installing KVM on Manjaro 21.

Now we check if your system supports hardware virtualization. To do so, run the following command:

lscpu | grep Virtualization

Output:

[root@idroot.us ~]# lscpu | grep Virtualization
Virtualization: VT-x
Virtualization type: full

Next, we need to check the Kernel support on our system. Run the command below to check:

zgrep CONFIG_KVM /proc/config.gz

Output:

CONFIG_KVM_GUEST=y
CONFIG_KVM_MMIO=y
CONFIG_KVM_ASYNC_PF=y
CONFIG_KVM_VFIO=y
CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
CONFIG_KVM_COMPAT=y
CONFIG_KVM_XFER_TO_GUEST_WORK=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
CONFIG_KVM_AMD=m
CONFIG_KVM_AMD_SEV=y
CONFIG_KVM_MMU_AUDIT=y

Once done, now install KVM and all the dependencies:

sudo pacman -S virt-manager qemu vde2 ebtables dnsmasq bridge-utils openbsd-netcat

Run the Virtual Machine Manager after installation is complete:

sudo systemctl enable libvirtd.service
sudo systemctl start libvirtd.service

Step 3. Configure KVM.

Now we open the /etc/libvirt/libvirtd.conf for editing:

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"

Once done, close and save the file.

Step 4. Accessing KVM on Manjaro Linux.

Once successfully installed, now we are ready to create our first virtual machine. Open the Virtual Machine Manager from the Application menu.

Install KVM on Manjaro 21

Congratulations! You have successfully installed KVM. Thanks for using this tutorial for installing the latest version of KVM on the Manjaro system. For additional help or useful information, we recommend you check the official KVM website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!