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

Command machine init fails to check if WSL is installed #25234

Open
l0rd opened this issue Feb 5, 2025 · 0 comments
Open

Command machine init fails to check if WSL is installed #25234

l0rd opened this issue Feb 5, 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 Feb 5, 2025

Issue Description

Podman tries to import the machine-os into WSL even when it's impossible because the Windows features Microsoft-Windows-Subsystem-Linux and VirtualMachinePlatform aren't enabled.

This is a regression observed with the latest version of the WSL client (2.3.26.0 or later).

Steps to reproduce the issue

Steps to reproduce the issue

  1. Make sure to have latest version WSL (wsl --update)
  2. Disable the Windows features Microsoft-Windows-Subsystem-Linux and VirtualMachinePlatform
  3. Run podman machine init

Describe the results you received

Extracting compressed file: podman-machine-default-amd64: done
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 could not be started because a required feature is not installed.
Error code: Wsl/Service/RegisterDistro/CreateVm/HCS/HCS_E_SERVICE_NOT_AVAILABLE
Error: the WSL import of guest OS failed: command C:\Users\mario\AppData\Local\Microsoft\WindowsApps\wsl.exe [--import podman-machine-default C:\Users\mario\.local\share\containers\podman\machine\wsl\wsldist\podman-machine-default C:\Users\mario\.local\share\containers\podman\machine\wsl\podman-machine-default-amd64 --version 2] failed: exit status 0xffffffff

Describe the results you expected

The command should NOT try to import the machine OS in WSL and propose to install WSL to the user:

WSL is not installed on this system, installing it.

NOTE: A system reboot will be required as part of this process. 
If you prefer, you may abort now, and perform a manual installation using the "wsl --install" command.

podman info output

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

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 kind/bug Categorizes issue or PR as related to a bug. windows issue/bug on Windows machine labels Feb 5, 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

1 participant