Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 946184 - app-containers/incus-6.0.2: missing environment var "INCUS_EDK2_PATH" in the systemd unit file
Summary: app-containers/incus-6.0.2: missing environment var "INCUS_EDK2_PATH" in the ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Joonas Niilola
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-10 08:29 UTC by zjnbzhzy
Modified: 2025-02-10 00:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zjnbzhzy 2024-12-10 08:29:42 UTC
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).
Comment 1 Joonas Niilola gentoo-dev 2024-12-10 14:33:25 UTC
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?
Comment 2 Joonas Niilola gentoo-dev 2024-12-10 14:34:13 UTC
Or maybe the paths we currently sed are wrong.
Comment 3 zjnbzhzy 2024-12-11 01:40:48 UTC
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.
Comment 4 Larry the Git Cow gentoo-dev 2024-12-15 07:23:23 UTC
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(+)