Easy virt-manager setup
Categories: Lovely Linux
In this short article I will explain how and what to install on an Arch-based distro to have a system to run some VMs. It is usually a controversial topic, but this is what I use. It does not mean it is the most correct way, but it means this setup has worked for me.
At this point of my Linux journey I don't care about non-rolling-release distros (e.g Ubuntu, CentOS, Fedora) as daily driver, but the general instructions should be extremely similar, so keep reading.
There are various ways to have such setup using various software stack. Some honorable mentions at the end of this article, but what I'm going to use here is the following combination as imho it is superior setup (for me personally):
- Check if your CPU supports virtualization:
LC_ALL=C lscpu | grep Virtualization
The acceptable value for the
virtualization field should be:
- for Intel CPUs:
- for AMD CPUs:
- Install the following packages:
sudo pacman -S libvirt qemu-full virt-manager
Note that while installing them, there might be lots of optional dependencies. Go through them and install things you need for your setup. Qemu is amazing, but it also has lots and lots of components, so be patient and research what you need and install them. Of course you can later install them.
- enable and start the libvirt daemon
systemctl enable --now libvirtd
Now, everything should be ready. you can run the
virt-manager from your launcher or even terminal. Upon the first run, you should "add connection" to qemu. I have also seen that restarting once solves lots of issues for the first run, because there are some situation that in the first run the
virt-manager cannot connect to the libvirt daemon.
- Virtual Box: I have used it for many years back when I was a windows user or later when I was OSX or Linux user. It has a very intuitive UI and it is not easy to mess it up, but for the same reason it is limited. Also being Oracle product makes it less interesting for me.