Skip to content

QEMU on antiX Linux

this guide will walk you though setting up QEMU, Virt Manager on Antix Linux runit v23.2, the instructions are inspired by this antix linux forum

  1. according to official QEMU guide , run install these Dependecies

    Terminal window
    sudo apt install qemu-system qemu-utils dnsmasq-base qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager gir1.2-spiceclientgtk-3.0 spice-vdagent
  2. to setup the libvirtd, virtlockd, virtlogd services, clone this gitlab repo

    Terminal window
    git clone https://gitlab.com/techore/libvirt-runit

    then copy the files to the required locations

    Terminal window
    cd libvirt-runit
    sudo cp -r etc/* /etc/
    sudo cp -r var/* /var/
    sudo ln -s /etc/sv/libvirtd /etc/service/libvirtd
    sudo ln -s /etc/sv/virtlockd /etc/service/virtlockd
    sudo ln -s /etc/sv/virtlogd /etc/service/virtlogd
    sudo sv start libvirtd
    sudo sv start virtlockd
    sudo sv start virtlogd
    sudo mkdir /usr/share/runit/sv/libvirtd
    sudo mkdir /usr/share/runit/sv/virtlockd
    sudo mkdir /usr/share/runit/sv/virtlogd
    sudo cp /etc/sv/libvirtd/run /usr/share/runit/sv/libvirtd/
    sudo cp /etc/sv/virtlockd/run /usr/share/runit/sv/virtlockd/
    sudo cp /etc/sv/virtlockd/run /usr/share/runit/sv/virtlockd/

    now, set the qemu network service on host system to autostart on startup

    Terminal window
    sudo virsh net-autostart default
  3. this step is a common miss, not doing this causes authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'

    Terminal window
    sudo usermod -aG libvirt $(whoami)

if you’re running a linux OS in the Virtual Machine and want to have a shared clipboard amoung host and guest OS, then : on the Guest System (the Virtual Machine), you need to install the spice-vdagent package
choose your Guest OS and run the given command :

Terminal window
sudo apt install spice-vdagent

after that, you need to start the spice-vdagent on startup on your Guest OS
choose the Guest OS to see instruction

create a file at /etc/sv/spice-vdagent/run

Terminal window
sudo vim /etc/sv/spice-vdagent/run

and add this exact content to it

#!/bin/sh
mkdir -p /run/spice-vdagentd
exec /usr/sbin/spice-vdagentd -x

then create a symlink of /etc/sv/spice-vdagent to /etc/service/ directory

Terminal window
sudo ln -s /etc/sv/spice-vdagentd /etc/service/

finally add this line at the end to the ~/.desktop-session/startup file using vim, nano, anything you like

Terminal window
spice-vdagent &