This story begins with me innocently wanting to try out virt-manager, a graphical frontend to libvirt, which in turn is a tool to manage virtualized systems, with support for various hypervisors. In my case, my hypervisor of choice has been QEMU for many, many years. Little did I know when I started my testing what virt-manager was going to do to my setup.

The way I use QEMU reflects the reason why I use it in the first place. I keep a FreeBSD VM and an OpenBSD VM to test the portability of my code when I’m writing a project. The reason why I do so is because on Linux testing against MUSL is trivial and substituting Clang/LLVM for GCC is also a trivial thing to do. However, when it comes to POSIX portability, one might get funny results when dealing with syscalls or with UNIX commands. Even though neither of both BSD systems mentioned is 100% POSIX compliant, stepping outside the Linux bubble is important to ensure that your code is more portable than what you might think from only reading the Standards section of manpages on Linux. So, these two VMs are two very simple systems, without any graphical environment, and that I fire up every once in a while on my desktop. I don’t keep them up for more than half an hour when I use them. So, accordingly, I’m used to fire them up via a simple shell script that is just one single line: