Cannot ssh into machine with networkingMode=mirrored
Issue Description
After setting networkingMode=mirrored in .wslconfig I'm no longer able to use Podman. That happens only after upgrading Podman version 4.9.3 -> 5.0.3
I have HyperVFirewall disabled. What's unusual, after starting other WSL distro - ubuntu in other cmd, issues are disappearing, as that somehow triggers network to mirror
Steps to reproduce the issue
- Set networkingMode=Mirrored in .wslconfig
- wsl --shutdown
- podman machine start Error: machine did not transition into running state: ssh error: machine is not listening on ssh port
- "Bash" in cmd (starts Ubuntu - default distro for me)
- podman machine ssh - works
Describe the results you received
Starting machine "podman-machine-default" API forwarding for Docker API clients is not available due to the following startup failures. could not start api proxy since expected pipe is not available: podman-machine-default
Podman clients are still able to connect. Error: machine did not transition into running state: ssh error: machine is not listening on ssh port
podman machine ssh - timeouts but after starting Ubuntu with "Bash" in other cmd podman machine ssh - works, docker ps works etc.
Describe the results you expected
podman machine start podman machine ssh works
podman info output
Client: Podman Engine
Version: 5.0.3
API Version: 5.0.3
Go Version: go1.22.3
Git Commit: d08315df35cb6e95f65bf3935f529295c6e54742
Built: Fri May 10 20:02:40 2024
OS/Arch: windows/amd64
Server: Podman Engine
Version: 5.0.3
API Version: 5.0.3
Go Version: go1.22.2
Built: Fri May 10 02:00:00 2024
OS/Arch: linux/amd64
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
HyperV Firewall is disabled
.wslconfig
[wsl2]
networkingMode=mirrored
dnsTunneling=true
autoProxy=true
[experimental]
hostAddressLoopback=true
Additional information
No response
Right podman machine does not currently support mirrored mode (it needs different handling to do so)
@n1hility I'd argue that it used to support mirrored networking, even podman 5.1 - however not with lastes machine version (see referenced issues) :)
I noticed that when networkingMode=mirrored, running podman machine start will break the mirrored networking totally until a wsl --shutdown.
Reproduce step:
- Set
networkingMode=mirrored - Open a Ubuntu WSL shell and run
sudo nginx - Visit http://localhost in Windows and you'll get the nginx page
- Run
podman machine start - Visit http://localhost in Windows and you cannot connect to the server any more
Doing wsl --terminate podman-machine-default does not fix that. Don't know what part of podman is making this result.
A friendly reminder that this issue had no activity for 30 days.
@taoyouh this is probably caused by https://github.com/containers/podman/issues/20379
Right podman machine does not currently support mirrored mode (it needs different handling to do so)
@n1hility Are there any plans to implement support for mirrored mode?
Not sure what happened, but podman is running correctly with networkingMode=mirrored on my 2 computers now. One of them is using podman 5.3.1 and the other is using podman 5.3.2.
hello, im have Podman Desktop 1.18 on windows 11, i have a podman started "podman version 5.4.2".
- podman system connection list Name URI Identity Default ReadWrite podman-machine-default ssh://[email protected]:64540/run/user/1000/podman/podman.sock C:\Users\xxxxx.local\share\containers\podman\machine\machine true true podman-machine-default-root ssh://[email protected]:64540/run/podman/podman.sock C:\Users\xxxxx.local\share\containers\podman\machine\machine false true
when i try pull image with podman desktop and i have this message : Error while pulling image from podman-machine-default: socket hang up