Incus need setup INCUS_EDK2_PATH to the path of edk2-ovmf (e.g., /usr/share/edk2-ovmf). Missing this environment variable will cause incus launch vm failed. Detailed message shown in the github issues 996 (repo: lxc/incus).
Hmm, I thought the seds we do in the ebuild were enough to handle this? What's the error you get when trying to start a VM?
Or maybe the paths we currently sed are wrong.
level=error msg="Unable to run feature checks during QEMU initialization: Unable to locate a UEFI firmware". That's what I found in the log. According to the issue, incus changed the environment variable name to the INCUS_EDK2_PATH since 6.5 (maybe 6.3, I'm not sure). But the version of incus I used is 6.0.2 lts, and when I using the old name, which is INCUS_OVMF_PATH, it still not work. I didn't found any environment variable in the unit file (An environment file, which is /etc/environment, mine is empty). In my system, the correct path is /usr/share/edk2-ovmf, which is quit different from other dist.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12e6e498ef9c722f38f4356f317050d50023eae8 commit 12e6e498ef9c722f38f4356f317050d50023eae8 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2024-12-15 07:18:00 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2024-12-15 07:23:19 +0000 app-containers/incus: add 6.8 - add 'qemu' use flag to pull all necessary dependencies to allow managing qemu-based virtual machines in incus, - add new env.d file to set INCUS_EDK2_PATH so OVMF files are found when using virtual machines, - allow selecting between iptables and nftables. All possible changes are synced to the LTS release upon new LTS version release. Closes: https://bugs.gentoo.org/944335 Closes: https://bugs.gentoo.org/946184 Closes: https://bugs.gentoo.org/945768 Signed-off-by: Joonas Niilola <juippis@gentoo.org> app-containers/incus/Manifest | 2 + app-containers/incus/incus-6.8.ebuild | 228 ++++++++++++++++++++++++++++++++++ app-containers/incus/metadata.xml | 1 + 3 files changed, 231 insertions(+)