Setting up QEMU/KVM on Manjaro and Arch Linux opens the door to powerful virtualization capabilities, allowing you to run virtual machines efficiently. In this article, I’ll walk you through how to set up QEMU/KVM on Manjaro and Arch Linux.
Please note, this article is not about comparing (VirtualBox, VMware, etc.) and determining which one is better or which to use. It exclusively focuses on QEMU and KVM with Virt-Manager.
1- Installation
The first thing we will do is install QEMU, Virt-Manager, and other required libraries.
sudo pacman -S qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat
It will ask you to choose from three options:
:: There are 3 providers available for qemu:
:: Repository extra
1) qemu-base 2) qemu-desktop 3) qemu-full
Enter a number (default=1):
Select 1, which is the default option. If you want to install qemu-desktop
as well, choose option 3. However, I recommend selecting qemu-base
.
After the installation is completed, enable libvirtd
to start at boot and then initiate the service.
sudo systemctl enable libvirtd
sudo systemctl start libvirtd
To check the status of libvirtd
:
sudo systemctl status libvirtd
2- Configure
We will enable a few options in libvirtd.conf
. I use vim for editing.
sudo vim /etc/libvirt/libvirtd.conf
Uncomment these lines if they are currently commented out.
unix_sock_group = "libvirt" (around line 85)
unix_sock_rw_perms = "0770" (around line 108)
Save and exit.
Next, add yourself to the libvirt group.
Useful tips:
- You can check groups with the
groups
command. - Check, you are part of which groups:
groups USERNAME
- Create a new group:
groupadd GROUP_NAME
For further information, refer to the Arch wiki page.
sudo usermod -G libvirt -a `whoami`
Afterwards restart libvirtd
:
sudo systemctl restart libvirtd
3- Start virt-manager
All done. You can now start virt-manager
either from the terminal or by selecting Virtual Machine Manager from the Application Launcher.