QEMU run as an Appimage in BookwormPup64 and others
A requirement for me to use BookwormPup64 for a daily driver is the functionality of QEMU. If somebody on the Forum would be able to compile this that would be great, but in the meantime I looked for other options. (compiling did not work...I’m not surprised with my skill level)
However, I came across this QEMU Appimage at https://github.com/lucasmz1/Qemu_Appimage.
There are two variants available, and without exhaustive testing, they both seem to work in BookwormPup64, as well as Fossapup64, Debian Dog and Quickpup64.
It does not run without error in S15pup for some reason, thus far.
To use the Appimge, download and change the permissions to executable. Lets say its called QEMU-x86_64.AppImage. For convenience, place in a new directory (say, QEMU). Open a terminal in that directory.
If you wish to use a virtual HDD, say to install the ISO, create a compressed qcow2 virtual HD drive in that folder: ./QEMU-x86_64.AppImage qemu-img create -f qcow2 VirtualHDD.img 30G
Copy the target ISO eg myiso.iso to the QEMU directory. I am assuming it is a 64 bit ISO.
Add this shell script to a text file using Geany and save in the same directory:
Make sure that the shell script is marked as executable.
#!/bin/sh
modprobe kvm-intel # start KVM on an intel device
./QEMU-x86_64.AppImage qemu-system-x86_64 -enable-kvm -cpu host -smp 2 \
-m 4G -boot d -cdrom myiso.iso -hda VirtualHDD.img \
-cpu host -vga std -usb -device usb-tablet -soundhw ac97
bash # this may keep the terminal open if there is an error
There should now be three files in the QEMU directory. Exactly how to run the executable file will depend on the filemanger. In any case run the script in a terminal to test it..
Once running use Geany in the virtual OS to add a partition table to the VirtualHDD and then format it to say, vfat32. Then install the OS as required on the HDD. The installed image can then be booted by changing the script from -boot d to -boot a.
I welcome others’ feedback on their experiences using this method.
Addenda:
a) If you are using an AMD computer, the second line must be modprobe kvm-amd.
b) In one case the Appimage did not run unless all spaces were removed from the appimage folder path. No idea why.
c) There is no need to cater for EFI booting unless the resulting image is designed to be burnt to a USB or HDD and booted independently.