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

WslRegisterDistribution failed with error: 0x80370102 #9656

Open
1 of 2 tasks
rnertney opened this issue Feb 18, 2023 · 11 comments
Open
1 of 2 tasks

WslRegisterDistribution failed with error: 0x80370102 #9656

rnertney opened this issue Feb 18, 2023 · 11 comments

Comments

@rnertney
Copy link

rnertney commented Feb 18, 2023

Version

Microsoft Windows [Version 10.0.22621.1265]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

2

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

In Windows Features:

  • Hyper-V is fully selected (all subchecks selected)
  • Virtual Machine Platform is fully selected
  • Windows Hypervisor Platform is fully selected
  • Windows Subsystem for Linux is fully selected

In task manager, virutalization is fully enabled in my BIOS, confirmed via systeminfo, too:


Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
                           Virtualization Enabled In Firmware: Yes
                           Second Level Address Translation: Yes
                           Data Execution Prevention Available: Yes
PS C:\WINDOWS\system32> ubuntu
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
For information please visit https://aka.ms/enablevirtualization
Press any key to continue...
PS C:\WINDOWS\system32> bcdedit /set hypervisorlaunchtype auto start
The operation completed successfully.

All of the online documentation takes me in loops or tells me to roll back to WSL 1.

The BIOS says I have virtualization enabled, the task manager says it....

I've disabled and re-enabled all of these checkboxes and rebooted, and I still cannot get WSL2 working on my Windows 11 box

Expected Behavior

I would expect ubuntu to load

Actual Behavior

PS C:\WINDOWS\system32> ubuntu
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
For information please visit https://aka.ms/enablevirtualization
Press any key to continue...
PS C:\WINDOWS\system32>

image

image

Diagnostic Logs

No response

@SirDarwin
Copy link

SirDarwin commented Feb 19, 2023

I've made a little bit of progress, I think?

I found there was an install of Kali Linux in my WSL and I have no idea how long it was there. I uninstalled it and installed Ubuntu, but now running the wsl command results in this message:

`Windows Subsystem for Linux has no installed distributions.

Use 'wsl.exe --list --online' to list available distributions
and 'wsl.exe --install ' to install.

Distributions can also be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
Error code: Wsl/Service/CreateInstance/GetDefaultDistro/WSL_E_DEFAULT_DISTRO_NOT_FOUND`

I've tried reinstalling Ubuntu, from both the Microsoft store and by using wsl --install but I'm still getting the same result. Opening the Ubuntu app in my Start Menu I get this:

Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80370102 Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS. For information please visit https://aka.ms/enablevirtualization Press any key to continue...

and Docker, which is what I'm ultimately trying to set up here, throws these errors:

Docker.Core.HttpBadResponseException:
{"message":"2 errors occurred:\n\t* provisioning docker WSL distros: deploying "docker-desktop": importing WSL distro "docker-desktop": deploying WSL distro "docker-desktop" ("C:\\Program Files\\Docker\\Docker\\resources\\wsl\\wsl-bootstrap.tar" -\u003e "C:\\Users\\SirDarwin\\AppData\\Local\\Docker\\wsl\\distro"): exit status 0xffffffff\n\t* checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: The network name cannot be found.\n\n"}

at Docker.Core.GoBackend.GoBackendClient.d__19.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.Core\GoBackend\GoBackendClient.cs:line 226
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.WSL2.LinuxWSL2Engine.d__11.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 54
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.TaskExtensions.d__0.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.StartTransition.d__6.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 91
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.ApiServices.StateMachines.StartTransition.d__6.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 118
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.EngineStateMachine.d__15.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:line 72
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.Engines.d__23.MoveNext() in C:\workspaces\4.16.x\src\github.com\docker\pinata\win\src\Docker.Engines\Engines.cs:line 109

I've been talking with a few people about this and apparently this means it can't find an install of WSL. So with all in this in mind, it seems WSL is still not working for me.

Another way to run Docker would be in a virtual machine, but not even those are working for me anymore. I have tried both Hyper-V and VMWare.

If I were unable to find a solution here or anywhere else, my only option would be to reinstall Windows which I'm avoiding at all costs.

It may be a good idea for you to check your installed distros if you haven't already, with wsl --list or --list --verbose, uninstall any you find and see how WSL behaves afterwards.

Edit: Also, I can't seem to tell if I'm on WSL 1 or 2. I tried setting the default version to 1 just to try, then disabling and re-enabling WSL in my Windows features, but I decided to go back to 2, did the same thing, and this is my version info:

WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2604

@LLP2333
Copy link

LLP2333 commented May 20, 2023

I also have the same issue. When this problem occurred, both my Windows Sandbox and WSL2 stopped working properly. Then I found an article about fixing the Sandbox and resolved the issue by following these steps:

Uninstall Windows Sandbox.

Restart your computer.

Open Command Prompt (Run as administrator) and execute the following command:

bcdedit /set hypervisorlaunchtype Auto

Uninstall Hyper-V.

Restart your computer.

Install Hyper-V.

Restart your computer and verify that Hyper-V is working.

Install Windows Sandbox.

Restart your computer and verify that Sandbox is functioning properly.

The link: https://answers.microsoft.com/zh-hans/windows/forum/all/windows-10-%E6%89%93%E5%BC%80windows/286f8a35-6a74-433c-b00f-bcd03812d180
I'm not sure why this solution is effective, but it did resolve the issue with my WSL2 not functioning properly.

@LLP2333
Copy link

LLP2333 commented May 20, 2023

Additional information: The issue with my WSL2 occurred after I installed an Android emulator called Mumu.

@NeroSH
Copy link

NeroSH commented Jan 29, 2024

I also have the same issue. When this problem occurred, both my Windows Sandbox and WSL2 stopped working properly. Then I found an article about fixing the Sandbox and resolved the issue by following these steps:

Uninstall Windows Sandbox.

Restart your computer.

Open Command Prompt (Run as administrator) and execute the following command:

bcdedit /set hypervisorlaunchtype Auto

Uninstall Hyper-V.

Restart your computer.

Install Hyper-V.

Restart your computer and verify that Hyper-V is working.

Install Windows Sandbox.

Restart your computer and verify that Sandbox is functioning properly.

The link: https://answers.microsoft.com/zh-hans/windows/forum/all/windows-10-%E6%89%93%E5%BC%80windows/286f8a35-6a74-433c-b00f-bcd03812d180 I'm not sure why this solution is effective, but it did resolve the issue with my WSL2 not functioning properly.

Thanks for your answer. I was really stuck on that error. Following first 6 steps helped me to install sucessfully Ubuntu and run docker server on my Winddoows 11 machine

@shokurov
Copy link

I'm experiencing absolutely the same problem. Tried all solutions listed, nothing really helps.

@LLP2333
Copy link

LLP2333 commented Apr 11, 2024

@shokurov Please try to open window's terminal as administrator, enter bcdedit command and check if the value of hypervisorlaunchtype is Auto. then check if the Windows Subsystem for Linux software from Microsoft Store is the latest version. You can check as above, if all these are fine, I don't know anymore.

@joseignaciostassi
Copy link

I also have the same issue. When this problem occurred, both my Windows Sandbox and WSL2 stopped working properly. Then I found an article about fixing the Sandbox and resolved the issue by following these steps:

Uninstall Windows Sandbox.

Restart your computer.

Open Command Prompt (Run as administrator) and execute the following command:

bcdedit /set hypervisorlaunchtype Auto

Uninstall Hyper-V.

Restart your computer.

Install Hyper-V.

Restart your computer and verify that Hyper-V is working.

Install Windows Sandbox.

Restart your computer and verify that Sandbox is functioning properly.

The link: https://answers.microsoft.com/zh-hans/windows/forum/all/windows-10-%E6%89%93%E5%BC%80windows/286f8a35-6a74-433c-b00f-bcd03812d180 I'm not sure why this solution is effective, but it did resolve the issue with my WSL2 not functioning properly.

You saved my day, i've spent 4 hours figuring this out, i did everything related to wsl, docker and BIOS stufff to enable virtualization, this was the answer.

@jetzewestra
Copy link

jetzewestra commented Sep 25, 2024

I struggled with this issue for some days and wasn’t able to fix it with the regular methods. I knew for sure I had virtualisation enabled in the bios, since wsl2 did work before. I turned off/on hyper-v and all other features. Nothing worked, although wsl 1 gave no issues. What I did notice lots off errors in eventlog and I ended up endlessly trying to fix several issues without solving the wsl2 issue.

As a last resort I tried fixing windows with help of the MediaCreationTool. After installing windows 10, but luckily leaving my current setup fully intact, wsl 2 worked again perfectly (out of the box).

@Ilyos890
Copy link

Not work it! 🥹

@hellodqy
Copy link

I resolved the 0x80370102 error through the following steps:

  1. bcdedit /set hypervisorlaunchtype auto
  2. Disable the "Virtual Machine Platform" feature
  3. Restart your PC
  4. Re-enable the "Virtual Machine Platform" feature
  5. Restart your PC

@maimanazani
Copy link

I resolved the 0x80370102 error through the following steps:

  1. bcdedit /set hypervisorlaunchtype auto
  2. Disable the "Virtual Machine Platform" feature
  3. Restart your PC
  4. Re-enable the "Virtual Machine Platform" feature
  5. Restart your PC

Thank you. It worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants