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

Not able to perform podman init #22659

Closed
tppalani opened this issue May 9, 2024 · 3 comments
Closed

Not able to perform podman init #22659

tppalani opened this issue May 9, 2024 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@tppalani
Copy link

tppalani commented May 9, 2024

podman-hyper-v-failed

Issue Description

I'm using widows 11 VM, after installing podman when I'm trying to perform the podman init i can see the below error message. I want to check with you is that all the hyper-v option should enabled in my system please refer the attached screen shot for more information.

Steps to reproduce the issue

Steps to reproduce the issue
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
bcdedit /set hypervisorlaunchtype auto

Describe the results you received

Describe the results you received

Describe the results you expected

Describe the results you expected

podman info output

If you are unable to run podman info for any reason, please provide the podman version, operating system and its version and the architecture you are running.

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.
WSL2 is not supported with your current machine configuration.
Please enable the "Virtual Machine Platform" optional component and ensure virtualization is enabled in the BIOS.
Enable "Virtual Machine Platform" by running: wsl.exe --install --no-distribution
For information please visit https://aka.ms/enablevirtualization
Error code: Wsl/Service/RegisterDistro/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED
Error: the WSL import of guest OS failed: exit status 0xffffffff

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

@tppalani tppalani added the kind/bug Categorizes issue or PR as related to a bug. label May 9, 2024
@tnk4on
Copy link
Contributor

tnk4on commented May 9, 2024

You should check ExposeVirtualizationExtensions.

Get-VMProcessor -VMName * |ft VMName,ExposeVirtualizationExtensions

If False is returned, stop the virtual machine and enable the feature.

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true

Please see references.
https://learn.microsoft.com/en-us/windows/wsl/faq#can-i-run-wsl-2-in-a-virtual-machine-
https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/enable-nested-virtualization

@ashley-cui
Copy link
Member

I believe you are using the WSL provider. You can set it to hyperV in containers.conf or the env var: $env:CONTAINERS_MACHINE_PROVIDER="hyperv"

@tppalani
Copy link
Author

Hi @ashley-cui @tnk4on Thanks for the quick response.

Our VMS are running VDDS , after enabling hyper-v hypervisor above issue got resolved.

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.
Projects
None yet
Development

No branches or pull requests

3 participants