[MacPorts] #67549: colima @0.5.5_0 container runtime fails to start
MacPorts
noreply at macports.org
Fri Aug 11 17:41:28 UTC 2023
#67549: colima @0.5.5_0 container runtime fails to start
---------------------+-------------------------
Reporter: a01fe | Owner: herbygillot
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords:
Port: colima |
---------------------+-------------------------
Comment (by klanchman):
I had some time to play with Lima and QEMU manually and I think I figured
out the general problem and a workaround.
I found that using Lima directly was also not working for me. I dug around
trying to figure out how to run something directly on QEMU aarch64 using
`-accel hvf` (like Lima does). Most incantations I could find led to the
same "no serial output, QEMU pegged at 100% CPU usage" behavior that
Lima/Colima had. I eventually found
[https://superuser.com/a/1685235/298773 a helpful Super User answer]
explaining that aarch64 QEMU machines always need to be pointed to an EFI
firmware image. Once I did that, the VM booted up just fine.
I dug a bit through Lima and found where they handle giving QEMU a
firmware image: https://github.com/lima-
vm/lima/blob/148b686f0b1f7a0ef752be613286142bd287a91e/pkg/qemu/qemu.go#L1068
It seems like Lima should be looking in the right place for this firmware
already, unless there's some subtle issue I'm missing (I don't write Go).
But I copied the firmware to one of the other paths, and somehow that made
Lima/Colima work for me!
----
**So, this is my workaround:**
Copy the EFI firmware image to one of the other directories where Lima
tries to find it:
{{{
mkdir -p ~/.local/share/qemu
cp /opt/local/share/qemu/edk2-aarch64-code.fd ~/.local/share/qemu/
}}}
Symlinking did not work for me, I had to copy it.
After this, the latest versions of colima/lima/QEMU from MacPorts are
working for me.
----
This isn't a long-term solution as I assume the firmware images might
change between QEMU versions, and MacPorts users shouldn't need to do this
extra step manually.
Does anybody sees an issue in how Lima is looking for firmware that it'd
work for Homebrew but not MacPorts? At some point I'll try to spend some
time debugging that code to see if I can figure anything else out.
--
Ticket URL: <https://trac.macports.org/ticket/67549#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list