1

After brew upgrade podman machine no longer works.

podman machine start
Starting machine "podman-machine-default"
Waiting for VM ...
Error: qemu exited unexpectedly with exit code 1, stderr: qemu-system-aarch64: -drive file=/opt/homebrew/Cellar/qemu/8.0.2/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on: Could not open '/opt/homebrew/Cellar/qemu/8.0.2/share/qemu/edk2-aarch64-code.fd': No such file or directory

How do I fix this error?

nelaaro
  • 14,139
  • 30
  • 88
  • 115

1 Answers1

2

The problem is that the path used is incorrect for the machine configured.

ls /opt/homebrew/Cellar/qemu/8.0.2/
ls: /opt/homebrew/Cellar/qemu/8.0.2/: No such file or directory

ls /opt/homebrew/Cellar/qemu/ 8.0.3/

If you edit the config for your machine you can update the path to the disk images

podman machine inspect podman-machine-default | jq .[].ConfigPath
{
"Path": "/Users/aaron/.config/containers/podman/machine/qemu/podman-machine-default.json"
}

Find the configuration that is incorrect.

jq .CmdLine ~/.config/containers/podman/machine/qemu/podman-machine-default.json | grep qemu\/8
"file=/opt/homebrew/Cellar/qemu/8.0.2/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on",

Edit the config file

nvim ~/.config/containers/podman/machine/qemu/podman-machine-default.json

Update the path to the new correct version number. From 8.0.2 -> 8.0.3

jq .CmdLine ~/.config/containers/podman/machine/qemu/podman-machine-default.json | grep qemu\/8
"file=/opt/homebrew/Cellar/qemu/8.0.3/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on",

In my case, I had to start, stop and start again to get every thing working correctly.

❯ podman machine set --rootful

❯ podman machine start Starting machine "podman-machine-default" Waiting for VM ... Mounting volume... /Users/aaron:/Users/aaron Error: exit status 255

❯ podman machine list NAME VM TYPE CREATED LAST UP CPUS MEMORY DISK SIZE podman-machine-default qemu 4 weeks ago Currently running 3 3.221GB 107.4GB

❯ podman machine stop Waiting for VM to exit... Machine "podman-machine-default" stopped successfully

❯ podman machine set --rootful

❯ podman machine start Starting machine "podman-machine-default" Waiting for VM ... Mounting volume... /Users/aaron:/Users/aaron Mounting volume... /private/tmp:/private/tmp Mounting volume... /var/folders/:/var/folders/ API forwarding listening on: /var/run/docker.sock Docker API clients default to this address. You do not need to set DOCKER_HOST.

Machine "podman-machine-default" started successfully

nelaaro
  • 14,139
  • 30
  • 88
  • 115