Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic installation of WSL fails #25523

Open
l0rd opened this issue Mar 10, 2025 · 0 comments
Open

Automatic installation of WSL fails #25523

l0rd opened this issue Mar 10, 2025 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. machine windows issue/bug on Windows

Comments

@l0rd
Copy link
Member

l0rd commented Mar 10, 2025

Issue Description

If WSL isn't installed, and a user tries to run podman machine init on Windows, Podman tries to install WSL automatically. This flow is currently broken.

Steps to reproduce the issue

Steps to reproduce the issue

  1. Disable the Windows feature VirtualMachinePlatform and reboot
  2. (until Fix WSL checks and run unit tests in CI #25522 get merged) Build podman from PR Fix WSL checks and run unit tests in CI #25522
  3. Run podman machine init

Describe the results you received

When machine init is run from an Admin terminal, the command fails with the error Error: could not enable Virtual Machine Feature: command dism [/online /enable-feature /featurename:VirtualMachinePlatform /all /norestart] failed: exit status 3010.

When machine init is run from a non-Admin terminal, the command fails because podman machine init is re-executed with elevated privileges and the hidden parameter --reexec. It fails when it tries to recreate the system connection with the same name (the system connection was already created before the WSL check).

Describe the results you expected

WSL should be enabled successfully

podman info output

OS: windows/amd64
provider: wsl
version: 5.5.0-dev

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/v5.5.0/libpod/_ping": dial unix /run/podman/podman.sock: connect: A socket operation encountered a dead network.

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@l0rd l0rd added the kind/bug Categorizes issue or PR as related to a bug. label Mar 10, 2025
@Luap99 Luap99 added machine windows issue/bug on Windows labels Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. machine windows issue/bug on Windows
Projects
None yet
Development

No branches or pull requests

2 participants