21. February 2022

Podman: Could not open ‘edk2-aarch64-code.fd’

It’s possible to use brew to install Podman on Apple Silicon (M1). The installation gets slightly more complicated when the user wants to use Homebrew installed in user’s home directory.

Problem #1 – gvproxy

Command:

podman machine start

Error:

Error: unable to start host networking: "could not find \"gvproxy\" in one of ....

Solution: add path to Podman’s helper binaries stored in bin and libexec to ~/.config/containers/containers.conf

[engine]
  helper_binaries_dir=["/Users/georgik.rocks/brew/Cellar/podman/4.0.3/bin","/Users/georgik.rocks/brew/Cellar/podman/4.0.3/libexec"]

Problem #2 – edk2-aarch64-code.fd

Command:

podman machine start

Error:

INFO[0000] new connection from  to /tmp/podman/qemu_podman-machine-default.sock
Waiting for VM ...
qemu-system-aarch64: -drive file=edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on: Could not open 'edk2-aarch64-code.fd': No such file or directory
Error: dial unix /tmp/podman/podman-machine-default_ready.sock: connect: connection refused
ERRO[0003] cannot receive packets from , disconnecting: cannot read size from socket: EOF
ERRO[0003] cannot read size from socket: EOF

Solution: Open file ~/.config/containers/podman/machine/qemu/podman-machine-default.json and change to /Users/USERNAME/brew/Cellar/qemu/6.2.0_1/share/qemu/edk2-aarch64-code.fd

"file=/Users/georgik.rocks/brew/Cellar/qemu/6.2.0_1/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on"

After these changes Podman should start without problem.