Here is the Complete guide on how to install KVM, QEMU and Virt Manager on Arch Linux and Manjaro. KVM is one of the most used Virtualization software in Linux World. In fact, most cloud providers use KVM as their Hypervisor of choice. Big projects including Openstack use KVM as default Virtualization tool.
In this tutorial, we’ll install KVM on Arch Linux and set Kernel modules required to automatically load at boot. We’ll also install a guest machine running CentOS 7.
Our previous tutorials on KVM include:
- Create and Configure Bridge Networking For KVM in Linux
- How To Clone and Use KVM Virtual Machine in Linux
- How to extend/increase KVM Virtual Machine (VM) disk size
Step 1: Install KVM packages
First step is installing all packages needed to run KVM:
sudo pacman -Syy
sudo pacman -S archlinux-keyring
sudo pacman -S qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat dmidecode
Also install ebtables and iptables packages:
sudo pacman -S ebtables iptables
Step 2: Install libguestfs on Arch / Manjaro
libguestfs is a set of tools used to access and modify virtual machine (VM) disk images. You can use this for:
- viewing and editing files inside guests
- scripting changes to VMs
- monitoring disk used/free statistics
- creating guests
- P2V
- V2V
- performing backup e.t.c
sudo pacman -S libguestfs
Step 3: Start KVM libvirt service
Once the installation is done, start and enable libvirtd service to start at boot:
sudo systemctl enable libvirtd.service
sudo systemctl start libvirtd.service
Status show it’s running:
systemctl status libvirtd.service
Step 4: Allow Libvirt for standard user accounts
Since we want to use our standard Linux user account to manage KVM, let’s configure KVM to allow this.
Open the file /etc/libvirt/libvirtd.conf for editing.
sudo pacman -S vim
sudo vim /etc/libvirt/libvirtd.conf
Set the UNIX domain socket group ownership to libvirt, (around line 85)
unix_sock_group = "libvirt"
Set the UNIX socket permissions for the R/W socket (around line 102)
unix_sock_rw_perms = "0770"
Add your user account to libvirt group.
sudo usermod -a -G libvirt $(whoami)
newgrp libvirt
Restart libvirt daemon.
sudo systemctl restart libvirtd.service
Step 5: Enable Nested Virtualization (Optional)
Nested Virtualization feature enables you to run Virtual Machines inside a VM. Enable Nested virtualization for kvm_intel / kvm_amd
by enabling kernel module as shown.
### Intel Processor ###
sudo modprobe -r kvm_intel
sudo modprobe kvm_intel nested=1
### AMD Processor ###
sudo modprobe -r kvm_amd
sudo modprobe kvm_amd nested=1
To make this configuration persistent,run:
echo "options kvm-intel nested=1" | sudo tee /etc/modprobe.d/kvm-intel.conf
Confirm that Nested Virtualization is set to Yes:
### Intel Processor ###
$ systool -m kvm_intel -v | grep nested
nested = "Y"
nested_early_check = "N"
$ cat /sys/module/kvm_intel/parameters/nested
Y
### AMD Processor ###
$ systool -m kvm_amd -v | grep nested
nested = "Y"
nested_early_check = "N"
$ cat /sys/module/kvm_amd/parameters/nested
Y
Step 6: Using KVM on Arch Linux / Manjaro
You have successfully installed KVM, QEMU and Virt Manager on Arch Linux and Manjaro. You are now good to go. You can install a Linux or Windows OS Virtual Machine and build your study labs.

Recommended Linux Books to read:
- Best Linux Books for Beginners & Experts
- Best Linux Kernel Programming Books
- Best Linux Bash Scripting Books
- Top RHCSA / RHCE Certification Study Books
Here are our few guides to get you started
- Using Vagrant with Libvirt on Linux.
- How to Provision VMs on KVM with Terraform
- How to Create CentOS / Fedora / RHEL VM Templates on KVM
- RHEL and CentOS Kickstart on KVM Automated Installation With virt-install
Other interesting guides.
thanks for the guide — very helpful
— i just wanted to note that it refers to using yaourt — which is no longer available
I chose to use yay after a google search — but thought you might want to update the instructions to your current preference.
Thanks we updated the article.
http://repo.archlinux.fr/$arch does not appear to exist any more
libguestfs seems to have been moved from aur to the community repository, there is no need to access aur for this install as far as I can tell
also, viewing libvitd status does not require root, the sudo should be removed.
True. Thank you.
How do we install KVM and not use QEMU? i want the full kernel level performance and manage my VM’s via something other than QEMU due to the potential performance hit of the layer 2 HyperVisor that is QEMU
Hey,
The entire article is on installation and using KVM with Virt Manager. Just follow through and should be good.
Thanks so much for this!!!
Thanks for the positive comment.
I’m going gool till the step 4, I think I did something wrong editing in vim, or something, but after that i cant restar virtualization daemon.
This article is only for intel processors… if you use AMD then replace all instances of kvm_intel with kvm_amd… Please change the article to reflect both or use a known $variable to make this an easy work around for copy/paste users
Thanks for the hint Chris. We’ve updated the article.
change
sudo vim /etc/libvirt/libvirtd.conf
to
sudo “your favorite editor” /etc/libvirt/libvirtd.conf e.g. sudo nano /etc/libvirt/libvirtd.conf
not everyone knows how to use vim/vi
Finally a complete guide for Manjaro system.
Thanks to this I’ve succesully installed it on my system.
The only think that I’ve not installed is
sudo pacman -S ebtables iptables
I’ve leaved the ones installed by default from Manjaro.
All works good.. bye bye virtualbox
Thanks a lot. New on arch, Manjaro.
Welcome Milan.
Hi, Josphat, thanks for the tutorial!
BTW, is it possible to install a Windows OS (win 10 or win 11) in KVM on Linux? If yes, how to do that? THX!
Thanks. For Windows 11 see our guide: https://computingforgeeks.com/enable-tpm-on-kvm-and-install-windows/
Great tutorial, but it wasn’t working as expected for me. After rebooting, virt-manager wouldn’t connect unless I restarted libvirtd.service. Then I noticed an error in journalctl about dmidecode being missing. After running pacman -S dmidecode, it’s working as expected. If you can, might want to update your guide to mention needing to install this package.
This has been updated. Thanks for the intel.
I have a problem when installing ebtables and iptables, they are conflict. As far as i know iptables replaces it in testing, and that is not a bug
These lines should not be passed as super user:
sudo systemctl enable libvirtd.service
sudo systemctl start libvirtd.service
Also on Manjaro kvm is automatically configured for your processor, thus making these lines redundant:
### Intel Processor ###
sudo modprobe -r kvm_intel
sudo modprobe kvm_intel nested=1
### AMD Processor ###
sudo modprobe -r kvm_amd
sudo modprobe kvm_amd nested=1
Other than that it all worked like a charm so thanks!
With this article I got KVM working. Thank you!