Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 939428 - app-containers/incus-6.4: virtual machine support is broken
Summary: app-containers/incus-6.4: virtual machine support is broken
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-09-10 10:32 UTC by Xuesong Yan
Modified: 2024-09-10 16:24 UTC (History)
1 user (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 Xuesong Yan 2024-09-10 10:32:10 UTC
Attempt to create a virtual machine, but incus daemon throws following error messages to its logfile:

Unable to run feature checks during QEMU initialization: Unable to locate a UEFI firmware

Reproducible: Always

Steps to Reproduce:
Just create a virtual machine.
Actual Results:  
Nothing happen except error messages.


It seems that the upstream move some logic into the file "internal/server/instance/drivers/edk2/driver_edk2.go", the "src_prepare" function in ebuild should be updated to follow the upstream changes.

As an ugly and quick workaround, I added a file (/etc/portage/env/app-container/incus) to patch the ebuild file, 

"
function post_src_prepare() {
        sed -i \
                -e "s:/usr/share/OVMF:/usr/share/edk2-ovmf:g" \
                -e "s:OVMF_VARS.ms.fd:OVMF_VARS.fd:g" \
                                internal/server/instance/drivers/edk2/driver_edk2.go || die "Failed to fix hardcoded ovmf paths."
}
"

But I am not sure incus-6.0.1-r1 works or not.
Comment 1 Joonas Niilola gentoo-dev 2024-09-10 15:58:02 UTC
Awesome, thanks! I'll include the fix in 6.5 soon.

Most likely LTS (6.0.1) isn't affected, but will have to see on the next version bump at least. Not sure if I've personally booted VMs in 6.0.1.
Comment 2 Larry the Git Cow gentoo-dev 2024-09-10 16:14:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33cbec09c4972302479826cecdfd26b094b2441b

commit 33cbec09c4972302479826cecdfd26b094b2441b
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2024-09-10 16:13:00 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2024-09-10 16:13:00 +0000

    app-containers/incus: fix OVMF file paths in 6.5
    
    Closes: https://bugs.gentoo.org/939428
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 app-containers/incus/incus-6.5-r1.ebuild | 215 +++++++++++++++++++++++++++++++
 1 file changed, 215 insertions(+)
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-10 16:15:00 UTC
Sometimes I use a patch w/ @GENTOO_BLAH_PATHS@ and sed that so I know when things have changed for this kind of situation.
Comment 4 Joonas Niilola gentoo-dev 2024-09-10 16:22:49 UTC
(In reply to Sam James from comment #3)
> Sometimes I use a patch w/ @GENTOO_BLAH_PATHS@ and sed that so I know when
> things have changed for this kind of situation.

I removed the OVMF file paths completely when bumping 6.5 because qa-sed notified be about them. Just figured upstream had made a better detection for them, since they also pushed support for some env variables determining the OVMF file paths prior. So really we wouldn't need to patch it if I updated init.d/service files, but I don't run 6.5 personally so it's a bit this and this to test everything.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-10 16:24:16 UTC
Ah, I see - thanks!