microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.17k stars 805 forks source link

WSL Not Working: WslRegisterDistribution failed with error: 0x8037011e #11666

Open raybeecham opened 2 months ago

raybeecham commented 2 months ago

Windows Version

Microsoft Windows [Version 10.0.19045.4412]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.146.1-2

Distro Version

No response

Other Software

image image

Repro Steps

  1. wsl --install -d ubuntu-18.04
  2. Installing and then goes to this error WslRegisterDistribution failed with error: 0x8037011e Error: 0x8037011e The host compute system service has disconnected unexpectedly. image

Expected Behavior

Install Ubuntu 18.04 LTS

Actual Behavior

I receive this error: WslRegisterDistribution failed with error: 0x8037011e Error: 0x8037011e The host compute system service has disconnected unexpectedly. image

Diagnostic Logs

DebugAnalysis.docx WslLogs-2024-06-07_09-13-13.zip

github-actions[bot] commented 2 months ago

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: ``` Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 Set-ExecutionPolicy Bypass -Scope Process -Force .\collect-wsl-logs.ps1 ``` The scipt will output the path of the log file once done. Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] commented 2 months ago
Diagnostic information ``` Issue was edited and new log file was found: https://github.com/user-attachments/files/15740890/WslLogs-2024-06-07_09-13-13.zip Detected appx version: 2.1.5.0 ```
sumo commented 2 months ago

I am seeing a similar issue that seems to be caused by Update KB5037853. On an clean installation of Windows 11 that did an update for KB5037853 I had the following with an existing WSL2 install when started

WSL2 is not supported with your current machine configuration.
Please enable the "Virtual Machine Platform" optional component and ensure virtualisation 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/CreateInstance/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED

When trying to install Ubuntu I got the following:

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...

None of the troubleshooting steps in https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#installation-issues made any difference.

I uninstalled KB5037853 and my Debian existing instance starts up fine and the Ubuntu installation completes. My working install is

WSL version: 2.1.5.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22631.3593

Windows information is

Edition Windows 11 Pro
Version 23H2
Installed on    ‎7/‎06/‎2024
OS build    22631.3593
Experience  Windows Feature Experience Pack 1000.22700.1003.0

I will reapply the update and collect wsl logs and post those.

sumo commented 2 months ago

Okay, I've reapplied KB5037853 and its still working so please ignore the above comment. Could be the order of installation maybe?

raybeecham commented 2 months ago

Okay, I've reapplied KB5037853 and its still working so please ignore the above comment. Could be the order of installation maybe?

Yeah, I'm not sure what the problem is

thethepai commented 2 months ago

I was able to use wsl2 normally, and encountered the same issue today, I modified the regkeys according to this: https://github.com/microsoft/WSL/issues/11697#issuecomment-2168104220 and the problem solved.

thethepai commented 2 months ago

another option I found is this:https://askubuntu.com/questions/1401830/wsl-not-working-after-update-from-microsoft-store

remittor commented 1 month ago

I have same problem. I tried all possible methods. Today I started trying to look in the direction of Hyper-V. This is how I fixed the problem (disable Hypervisor):

wsl2_fix

reboot bcdedit /set hypervisorlaunchtype off reboot bcdedit /set hypervisorlaunchtype Auto reboot