Closed anjannath closed 1 year ago
@n1hility PTAL
@anjannath can you describe more about the lead up? was this a clean installation or did podman wsl already exist?
Same for me; every command shows an error for Podman 4.5.0:
Error: could not enable linger for remote user on guest OS: exit status 0xffffffff
I had to forcibly run:
PS> wsl --unregister podman-machine-default
to continue, as
PS> wsl --list
Windows Subsystem for Linux Distributions:
fedorawsl (Default)
podman-machine-default
showed the presence of an unusable WSL environment. This is why the error was returned; the WSL distro was not able to start or otherwise in an unusable state.
After this I can run:
PS> podman machine init
There is no distribution with the supplied name.
Error code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND
Downloading VM image: fedora-podman-amd64-v37.0.16.tar.xz: done
Extracting compressed file
Importing operating system into WSL (this may take a few minutes on a new WSL install)...
Import in progress, this may take a few minutes.
The operation completed successfully.
Configuring system...
Keys already exist, reusing
Error: cannot overwrite connection
with some errors as not all was removed with this action.
PS> podman machine list
NAME VM TYPE CREATED LAST UP CPUS MEMORY DISK SIZE
podman-machine-default wsl About a minute ago About a minute ago 0 0B 717.2MB
I would suggest something like a podman machine clean
(or rm -f
) to remove ANY reference to a WSL environment, removal of keys, etc. As the user might end up with a non-functional environment.
PS> podman ps
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: Get "http://d/v4.5.0/libpod/_ping": dial unix ///run/podman/podman.sock: connect: An invalid argument was supplied.
The suggested init
(was performed) and start
does not give the expected result as suggested:
PS> podman machine start
Starting machine "podman-machine-default"
This machine is currently configured in rootless mode. If your containers
require root permissions (e.g. ports < 1024), or if you run into compatibility
issues with non-podman clients, you can switch using the following command:
podman machine set --rootful
API forwarding listening on: npipe:////./pipe/docker_engine
Docker API clients default to this address. You do not need to set DOCKER_HOST.
Machine "podman-machine-default" started successfully
PS> podman ps
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: Get "http://d/v4.5.0/libpod/_ping": dial unix ///run/podman/podman.sock: connect: An invalid argument was supplied.
To perform a clean, something similar to a stop
and rm
is necessary
PS> podman machine stop
Machine "podman-machine-default" stopped successfully
PS> podman machine rm
The following files will be deleted:
C:\Users\gbraad\.ssh\podman-machine-default
C:\Users\gbraad\.ssh\podman-machine-default.pub
C:\Users\gbraad\.local\share\containers\podman\machine\wsl\podman-machine-default_fedora-podman-amd64-v37.0.16.tar
C:\Users\gbraad\.config\containers\podman\machine\wsl\podman-machine-default.json
C:\Users\gbraad\.local\share\containers\podman\machine\wsl\wsldist\podman-machine-default
and the previously mentioned wsl --unregister
. Having no command to force the wsl --unregister
would otherwise need knowledge of how wsl
operates. The removal of the keys/machine definition should be forced to prevent a (re)init to end up in an usable state for the podman
command.
PS> podman machine init
Extracting compressed file
Importing operating system into WSL (this may take a few minutes on a new WSL install)...
Import in progress, this may take a few minutes.
The operation completed successfully.
Configuring system...
Generating public/private ed25519 key pair.
Your identification has been saved in podman-machine-default
Your public key has been saved in podman-machine-default.pub
The key fingerprint is:
SHA256:qAtpR6uPYqVLnEp3yOF2IGg4xaCZyelQjxv6lY+wp2o root@WinT14
The key's randomart image is:
+--[ED25519 256]--+
|. . |
|oB.o |
|*o= . |
|=o o . . |
|=+oo+ . S |
|oo=B+= |
| =O**o. |
|=EoBo. |
|=+=.o |
+----[SHA256]-----+
Machine init complete
To start your machine run:
podman machine start
PS> podman machine start
Starting machine "podman-machine-default"
This machine is currently configured in rootless mode. If your containers
require root permissions (e.g. ports < 1024), or if you run into compatibility
issues with non-podman clients, you can switch using the following command:
podman machine set --rootful
API forwarding listening on: npipe:////./pipe/docker_engine
Docker API clients default to this address. You do not need to set DOCKER_HOST.
Machine "podman-machine-default" started successfully
PS> podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
A friendly reminder that this issue had no activity for 30 days.
@n1hility WDYT?
My leading theory as to what caused this is that the vhdx file for the WSL distro that is backing the WSL distro was manually deleted (e.g. deleting files under .local\share\containers\podman\machine\wsl\wsldist)
The code being triggerd is a migration path for an old version file, and its trying to fix up the WSL distro, with a command that should not fail. The error returned "The system cannot find the path specified." would happen if it cant find the ext4 vhdx file to mount.
The fact that an old version file is involved makes me think this was an old machine instance that was partially cleaned up.
The only way around this situation is to podman machine rm as @gbraad shows. I am going to close this assuming this is the case, but feel free to reopen if this isnt and we can perform additional diagnostics.
Issue Description
podman machine list
doesn't show the available podman machine, instead it exits with the following error:Steps to reproduce the issue
Steps to reproduce the issue
podman machine init
thenpodman machine start
podman machine list
Describe the results you received
Got an error saying:
Describe the results you expected
Expected to get a list of the available podman machines.
podman info output