Qemu runs incus-migrated root.img OK, but incus doesn't boot it (can't find .efi file)

Incus doesn’t support Slackware VMs (well, no Slackware VM available at images repo). I’d like to make that happen and my strategy is to start by converting a VM that I know works with qemu using UEFI boot (but no secureboot).

I used incus-migrate on the VM which created a root.img file in local storage. If I substitute this new root.img location into my qemu startup script, it boots and runs fine just like the original. However starting it with incus start NAME --console=vga, I have to wait through seemingly endless unsuccessful attempts to boot via PXE and HHTP before reaching a uefi shell. I can then cd to the right directory to run the .efi file and actually boot the VM. I’ve since found that I can use the eufi shell’s bcfg command to insert the required location, after which subsequent boots via incus work as expected.

Since Slackware doesn’t use systemd, I had to make a small change to config/install.sh so that, after running it once manually, it then runs the incus-agent by itself at every boot, enabling incus exec etc. to run just like a supported system.

It’s all very close to being able to be supported - just the initial incus booting doesn’t work without unwanted fiddling. I’m running incus-6.6 and my OVMF files come from a Slackware edk2-ovmf package which looks like a repackaging of a fedora package - August 2024 so should be OK.

Does anyone have ideas about how to resolve the initial boot issue?

Thanks for any tips. ideas, insights …
chris

Hi!

Indeed, while the images: remote has a container image for Slackware, there is no VM image. For the container image, Add support for slackware by slapcat · Pull Request #766 · lxc/distrobuilder · GitHub and lxc-ci/images/slackware.yaml at main · lxc/lxc-ci · GitHub

Ideally, you would want to make a distrobuilder script that would build such a VM image in a way that it would boot without looking for PXE, and with support for the incus-agent. Indeed, if Slackware does not support systemd, then the incus-agent is not able to run automatically on newly created VMs. But a bigger problem is whether the Slackware Linux kernel supports the 9p filesystem out of the box.
Perhaps if you create a distrobuilder script for Slackware that has support for cloud-init and push the extra configuration that way?

Thanks for your comments @simos.

I had a quick look at distrobuilder a while ago but I couldn’t make it work with the official slackware.yaml you linked to - I will return to it sometime. Meanwhile the idea of migrating an existing VM seemed like lower hanging fruit - which now has only this “first boot” problem remaining.

Interestingly, I just saw almost exactly the same problem mentioned here (although the message title is misleading). Maybe an incus-migrate issue?

Also another with same problem.

For (relative) completeness, the solution suggested here works pretty well. It is also more of a work-around than the proper solution as suggested above by @simos but it will do until I (or someone) can do a distrobuilder script for Slackware.

1 Like