podman-desktop
podman-desktop copied to clipboard
Podman machine cannot be stopped from PD after starting a container
Bug description
It seems that on macOS(wasn't able to reproduce on windows 11) it's not possible to stop a podman machine after starting a container, however after the fail error is throw all the images/containers/pods will become unavailable, presumably because the podman machine entering some error state.
https://github.com/containers/podman-desktop/assets/106525396/5feeba0d-375a-49fd-8bc5-fe5782158e70
Operating system
macOS
Installation Method
Installer from website/GitHub releases
Version
1.10.0
Steps to reproduce
- Start a podman machine on macOS with applehv.
- Pull and image.
- Run the image as a container.
- After the container starts running go into Settings and try to stop the podman machine.
- Notice the failure error thrown.
- Navigate to images/containers/pods menus and notice that all the items are gone.
Relevant log output
Error: failed waiting for vm to stop
Error: failed waiting for vm to stopode 125
Starting machine "podman-machine-default"25
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
Error: failed waiting for vm to stop
Starting machine "podman-machine-default"25
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
Error: failed waiting for vm to stop
Command execution failed with exit code 125
===============================================
CLI output:
vladimirlazar@Vladimirs-MacBook-Pro-2 ~ % podman machine list
NAME VM TYPE CREATED LAST UP CPUS MEMORY DISK SIZE
podman-machine-default* applehv 27 minutes ago Currently running 6 12.11GiB 93GiB
podman-machine-rootless applehv 23 minutes ago 21 minutes ago 4 3.725GiB 93GiB
vladimirlazar@Vladimirs-MacBook-Pro-2 ~ % podman images
Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman socket: failed to connect: ssh: handshake failed: read tcp 127.0.0.1:56739->127.0.0.1:53782: read: connection reset by peer
vladimirlazar@Vladimirs-MacBook-Pro-2 ~ % podman machine stop
Machine "podman-machine-default" stopped successfully
vladimirlazar@Vladimirs-MacBook-Pro-2 ~ %
Additional context
No response
should it be more reported on podman side ? Podman Desktop is not involved if basically it's just 'podman start', 'run a container' and call 'podman machine stop'
Reproduced on Mac OS 14 M2.
But it eventually stopped. Even with an error, but stopped.
Created issue https://github.com/containers/podman/issues/22515 in podman repo.
@cbr7 thanks!
I've checked with podman 4.9.4 and it's still 1mn
There is area for improvement but it looks it's not a 'new issue' (for the severity)
If you try with containers without interactive shell it should be immediate
While trying to reproduce this issue and I was able to stop the machine with no problems, but it wouldn't start again, ending the process with "Command execution failed with exit code 125" as well.
@cbr7 We have patch merged in upstream, we could test it out, although, I am not sure where it should land exactly (client, engine inside vm?)
Confirmed fixed in PD 1.12.
@cbr7 thanks for confirmation!