docs: refactored _Troubleshooting Podman on Windows_ (#3206)

This commit is contained in:
Fabrice Flore-Thébault 2023-07-14 09:30:01 +02:00 committed by GitHub
parent 7c41912113
commit 0ea66b61ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,37 +4,51 @@ sidebar_position: 20
# Troubleshooting Podman on Windows
### Fixing corrupted Podman Machine in Windows
You can find here troubleshooting help for issues specific to Windows.
If at all you are not able to stop your Podman Machine, you will find such an error in the Logs-
`Error: Error stopping sysd: exit status 0`
It is highly unlikely that you might be stuck in such a situation but if you are, here's a quick fix for it.
Assuming the name of the Podman Machine to be `my-machine`, run the following commands in the terminal:
```sh
wsl --list
```
This shall display a list of active distributions, such as `my-machine` in this case.
Then,
```sh
wsl --unregister my-machine
```
(Replacing `my-machine` with the name that is displayed under `wsl --list` for your Podman Machine)
This will stop the Podman Machine for you.
## The terminal session attaches to Podman Desktop when launching it from the command line in Windows
## Deleting a corrupted Podman Machine
#### Issue
When you start Podman Desktop from the command line in Windows the terminal session attaches to it. You cannot quit the terminal because it will kill Podman Desktop as well.
1. You are not able to stop your Podman Machine.
#### Solution
```shell-session
$podman machine stop
```
Set the environment variable `ELECTRON_NO_ATTACH_CONSOLE` to true before launching Podman Desktop.
2. The Logs contain this error:
```shell-session
Error: Error stopping sysd: exit status 1
```
#### Workaround
1. To display the active Windows Subsystem for Linux (WSL) distribution list: in the terminal, run:
```shell-session
$ wsl --list
```
1. The command returns the list of active WSL distributions. Identify your Podman Machine in the list, such as `podman-machine-default`.
1. To stop, and uninstall your Podman Machine: in the terminal, replace `podman-machine-default` by your Podman machine name, and run:
```shell-session
$ wsl --unregister podman-machine-default
```
#### Additional resources
- [WSL documentation: Uninstall a Linux distribution](https://learn.microsoft.com/en-us/windows/wsl/basic-commands#unregister-or-uninstall-a-linux-distribution)
## The terminal session attaches to Podman Desktop when launching it from the command line
#### Issue
1. When you start Podman Desktop from the command line in Windows the terminal session attaches to it.
1. When you quit the terminal, it kills Podman Desktop.
#### Workaround
- Set the environment variable `ELECTRON_NO_ATTACH_CONSOLE` to true before launching Podman Desktop.