
brew アップグレード後、podman マシンは動作しなくなりました。
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
このエラーを修正するにはどうすればいいですか?
答え1
問題は、構成されたマシンに対して使用されているパスが正しくないことです。
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/
マシンの設定を編集すると、ディスクイメージへのパスを更新できます。
podman machine inspect podman-machine-default | jq .[].ConfigPath
{
"Path": "/Users/aaron/.config/containers/podman/machine/qemu/podman-machine-default.json"
}
間違っている構成を見つけます。
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",
設定ファイルを編集する
nvim ~/.config/containers/podman/machine/qemu/podman-machine-default.json
パスを新しい正しいバージョン番号に更新します。- 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",
私の場合、すべてを正しく動作させるために、開始、停止、そして再度開始する必要がありました。
❯ 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