-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Comments
Currently, there is only one way to directly determine whether a certain feature is enabled in Windows: Get-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux However, this method requires administrative privileges, and asking users for administrative permissions at every startup is generally unacceptable. We encountered this in our requirements as well. After testing, we found a workaround to make the judgment, and the relevant code is: I'm not sure if podman needs a check like this. If it does, I can submit a related PR. By the way, just checking the Feature is not enough. It's also necessary to check if BIOS virtualization is enabled, if the WSL version is too low, and if the user has modified the kernel configuration in .wslconfig. |
Thank you @BlackHole1. I am about to submit a PR that uses a similar approach (look for sentences in |
Fixes containers#25234 Signed-off-by: Mario Loriedo <[email protected]>
Fixes containers#25234 Signed-off-by: Mario Loriedo <[email protected]>
Fixes containers#25234 Signed-off-by: Mario Loriedo <[email protected]>
Fixes containers#25234 Signed-off-by: Mario Loriedo <[email protected]>
Issue Description
Podman tries to import the machine-os into WSL even when it's impossible because the Windows features
Microsoft-Windows-Subsystem-Linux
andVirtualMachinePlatform
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
wsl --update
)Microsoft-Windows-Subsystem-Linux
andVirtualMachinePlatform
podman machine init
Describe the results you received
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:
podman info output
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
The text was updated successfully, but these errors were encountered: