AutoQEMU - automate installation and SSH setup of ISO OS images

Posted on February 7, 2021

After reading begriffs “Tips for stable and portable software”, the “Begriffs Buildfarm?” section caught my attention, as this is something I would be interested in.

After emailing the author, a public thread began on the subject.

As we discussed how it could be done, I decided to experiment with the idea of automating the setup of virtual environments with QEMU.

This screencast is a simple demo of automating the installation of Alpine Linux 3.12.3 standard x86_64 with AutoQEMU, which is nothing more than POSIX sh, expect scripts and Makefiles glued together.

As of this writing, I just worked on it for 2~3 days, so everything is still pretty ad-hoc.

The commands from the screencast were1:

pushd `mktemp -d`
git clone .
make install PREFIX=$HOME/.local
autoqemu ssh alpine

It assumes that $HOME/.local/bin is in $PATH.

  1. Only now, writing again what I ran on the screencast I thought that I should have tried something like script. Maybe next time (thanks klaatu for the tip!).