Closed feloy closed 8 months ago
The socket should be acquired at the moment, when machine is started. I believe if you restart the machine after you deleted another machine, it will be restored.
Seems to not affect Podman Machine 5. podman.sock
now is not a part of resources being removed with rm
podman machine rm machine-alt
The following files will be deleted:
/Users/username/.config/containers/podman/machine/applehv/machine-alt.json
/var/folders/9n/358_gdmn3fxfnyttwys8k1dm0100gn/T/podman/machine-alt.sock
/var/folders/9n/358_gdmn3fxfnyttwys8k1dm0100gn/T/podman/machine-alt.log
Are you sure you want to continue? [y/N]
I'm working from memory here, in part because we have been heads down on Podman 5. That said, the behavior you describe, to my memory, seems valid. However, the socket is only needed when a machine starts or is running. Therefore, I don't think there is harm? Or do you see an error when performing a start on the second machine.
I think it has been this way since Podman 4.5, when the socket moved from the machine location to a shared location
4.4: ~/.local/share/containers/podman/machine/podman-machine-default/podman.sock
4.5: ~/.local/share/containers/podman/machine/qemu/podman.sock
For Podman v3 it used ssh:
rather than unix:
I'm working from memory here, in part because we have been heads down on Podman 5. That said, the behavior you describe, to my memory, seems valid. However, the socket is only needed when a machine starts or is running. Therefore, I don't think there is harm? Or do you see an error when performing a start on the second machine.
The usecase is described in this issue: https://github.com/containers/podman-desktop/issues/5820
On Podman Desktop, when you have a running machine, and another one you want to delete, deleting the second will break the access to the first (running) one.
I agree that a workaround could be that the user restart the first one (or Podman Desktop restart it for the user).
the basic problem is that the qemu socket is not namespaced
Issue Description
When I have several podman machines and I remove one of them using
podman machine rm <name>
, the socket is deleted, as part of the process. But, if I understand correctly, all the machines share the same socket, and so, this socket is not available anymore for other machines.Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
See above
Describe the results you expected
I would expect that the socket ie deleted only when the latest machine is deleted (or never deleted)
podman info output