Installing virt-manager in any Arch-based system

1. Install the needed packages to run virt-manager, and update the system. Reboot if necessary.

sudo pacman -Syu --needed virt-manager qemu-desktop libvirt edk2-ovmf dnsmasq bridge-utils openbsd-netcat iptables-nft

2. After installation completes you need to enable libvirtd service.

sudo systemctl enable --now libvirtd.service

3. To use our normal user without entering the root password we need to configure KVM to enable it. This will also enable the libvirt networking components as well without doing this it won’t work. You need to open the libvirt configuration file located at /etc/libvirt/libvertd.conf. To open you can use your favorite text editor. All examples use nano. Do not use a GUI text editor with sudo.

sudo nano /etc/libvirt/libvirtd.conf

Now we need to set UNIX domain socket ownership to libvirt. Scroll down till you see the below line and uncomment it.

unix_sock_group = 'libvirt'

Let’s set the UNIX socket permission to R/W. Scroll down till you see the below line and uncomment it.

unix_sock_rw_perms = '0770'

4. Add your user account to the libvirt group.

sudo usermod -a -G libvirt <your username>

5. Now we need to add our user to qemu.conf. Otherwise, QEMU will give a permission denied error when trying to access local drives. You can use your favorite text editor to edit the file.

sudo nano /etc/libvirt/qemu.conf

Scroll down or search for user = "root" or group = "root". Then uncomment both entries and change the root to your user name or ID and then save and exit. Once edited it should look something like below.

# Some examples of valid values are:
#
#       user = "qemu"   # A user named "qemu"
#       user = "+0"     # Super user (uid=0)
#       user = "100"    # A user named "100" or a user with uid=100
#
user = "your username"

# The group for QEMU processes run by the system instance. It can be
# specified in a similar way to user.
group = "your username"

6. Now reboot the system.

----------
Adapted from:
https://forum.endeavouros.com/t/tutorial-how-to-install-virt-manager-correctly-on-eos-arch-base-systems/
Sandaruwan Samaraweera (s4ndm4n)
Wiki Contributor
Posted: August, 2021


_____
install_virt-manager.txt
# Revision: 2024.03.14 -- by eznix (https://sourceforge.net/projects/ezarch/)
# (GNU/General Public License version 3.0)
