Quickemu
If your distro have all the dependencies, Quickemu is very easy to use and works in the command line.
For the installation, take a look here: https://github.com/quickemu-project/quickemu/wiki/01-Installation
Download any ISO
Quickemu download image in your current directory so, you want to organize your vms.
cd ~
mkdir quickemu
cd quickemu
After that, use Quickget. For this tuto, i will install [Voidlinux].
quickget # list all os available, need to choose one
quickget void # need to choose release and edition
quickget void 20250202 musl # we're ok here
The script will create a directory void-20250202-musl in your current directory, download the iso and create a qemu image.
Configure the vm
Before installing Void, we configure a bit the vm by editing the config file created by Quickget. You can resize the Qemu image later but it's more easy to resize it before the install.
$EDITOR qemu-20250202-musl.conf
ram="2G" # default is 4G
ssh_port="22224"
disk_size="20G"
If you need to resize the disk later, use qemu-img:
qemu-img resize void-20250202-musl/disk.qcow2 +10G
Ready to install Void
Here, we start using Quickemu
quickemu --vm void-20250202-musl.conf
Because, i'm lazy, i written a tool in ruby to install Voidlinux or Gentoo [getch].
When Quickemu has finished to start the iso.
xbps-install -S ruby xz gptfdisk openssl git
cd /tmp
git clone https://github.com/szorfein/getch
cd getch
ruby -I lib bin/getch -o void --disk vda --musl
reboot # when finished
For the disk, just look if /dev/vda exist or choose another disk.
It's all for install Void.
Create snapshot
Just after a clean install, you want to create a snapshot to avoid to reinstall 'just in case'.
quickemu --vm void-20250202-musl.conf --snapshot create "base-install"
When you need to restore this snapshot.
quickemu --vm void-20250202-musl.conf --snapshot info
quickemu --vm void-20250202-musl.conf --snapshot apply "base-install"