Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 867772 - sys-cluster/minikube: kvm2 driver uses wrong hardcoded paths for aarch64 efi firmware (sys-firmware/edk2-ovmf)
Summary: sys-cluster/minikube: kvm2 driver uses wrong hardcoded paths for aarch64 efi ...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: Zac Medico
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-08-31 22:16 UTC by ev
Modified: 2022-09-01 19:28 UTC (History)
3 users (show)

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


Attachments
patch changing hardcoded paths (aarch64-ovmf.patch,1.22 KB, patch)
2022-08-31 22:16 UTC, ev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ev 2022-08-31 22:16:35 UTC
Created attachment 802300 [details, diff]
patch changing hardcoded paths

minikube kvm2 driver uses hardcoded paths to aarch64 version of sys-firmware/edk2-ovmf and cannot create libvirt VM.

I've tested it on =sys-cluster/minikube-1.26.1

Example:
 LC_ALL=C minikube start --driver=kvm2
* minikube v1.26.1 on Gentoo 2.8 (arm64)
* Using the kvm2 driver based on user configuration
* Starting control plane node minikube in cluster minikube
* Creating kvm2 VM (CPUs=2, Memory=2200MB, Disk=20000MB) ...
* Deleting "minikube" in kvm2 ...
! StartHost failed, but will try again: creating host: create: Error creating machine: Error in driver during machine creation: error creating VM: virError(Code=38, Domain=10, Message='Otwarcie pliku „/usr/share/AAVMF/AAVMF_VARS.fd” się nie powiodło: Nie ma takiego pliku ani katalogu')
* Creating kvm2 VM (CPUs=2, Memory=2200MB, Disk=20000MB) ...
* Failed to start kvm2 VM. Running "minikube delete" may fix it: creating host: create: Error creating machine: Error in driver during machine creation: error creating VM: virError(Code=38, Domain=10, Message='Otwarcie pliku „/usr/share/AAVMF/AAVMF_VARS.fd” się nie powiodło: Nie ma takiego pliku ani katalogu')

X Exiting due to GUEST_PROVISION: Failed to start host: creating host: create: Error creating machine: Error in driver during machine creation: error creating VM: virError(Code=38, Domain=10, Message='Otwarcie pliku „/usr/share/AAVMF/AAVMF_VARS.fd” się nie powiodło: Nie ma takiego pliku ani katalogu')
* 

I couldn't change locale, message errors talk about missing files and directories.

I've tried to patch hardcoded paths. New firmware paths work on --driver=qemu2 but --driver=kvm2 is still broken. I can't figure out why. 


This is the patch I've used. 
https://github.com/adippl/evgr/blob/master/sys-cluster/minikube/files/aarch64-ovmf.patch
and my ebuild
https://github.com/adippl/evgr/blob/master/sys-cluster/minikube/minikube-1.26.1.ebuild
Comment 1 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-08-31 23:08:27 UTC
Actually, I think QEMU should be installing some aarch64 firmware? Or edk2-ovmf should be?
Comment 2 ev 2022-09-01 06:46:42 UTC
(In reply to John Helmert III from comment #1)
> Actually, I think QEMU should be installing some aarch64 firmware? Or
> edk2-ovmf should be?


Sorry, /usr/share/qemu/edk2-aarch64-code.fd and /usr/share/qemu/edk2-arm-vars.fd belong to app-emulation/qemu package on gentoo.
Comment 3 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-09-01 19:28:42 UTC
(In reply to ev from comment #2)
> (In reply to John Helmert III from comment #1)
> > Actually, I think QEMU should be installing some aarch64 firmware? Or
> > edk2-ovmf should be?
> 
> 
> Sorry, /usr/share/qemu/edk2-aarch64-code.fd and
> /usr/share/qemu/edk2-arm-vars.fd belong to app-emulation/qemu package on
> gentoo.

For which QEMU version, and which arch was it built on? QEMU upstream bundles edk2-ovmf, but we unbundle it in the ebuild and instead use sys-firmware/edk2-ovmf.