microsoft / WSL

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

Persistent Error 0x80070426 with WSL on Windows 11 #11656

Closed LemonadeGoneLime closed 5 days ago

LemonadeGoneLime commented 2 months ago

Windows Version

Microsoft Windows 11 Enterprise, Version 21H2, OS build 22000.2960

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.146.1-2

Distro Version

Not applicable as the installation of Ubuntu does not complete.

Other Software

None involved.

Repro Steps

  1. Enable WSL and Virtual Machine Platform via PowerShell and Windows features.
  2. Start LxssManager service, confirm it's running.
  3. Use wsl --install -d Ubuntu to install Ubuntu.
  4. Encounter error: WslRegisterDistribution failed with error: 0x80070426.
  5. Use wsl --list --verbose, results show no distributions installed despite installation claims.

Expected Behavior

Expected Ubuntu to install successfully and launch without errors.

Actual Behavior

Received error 0x80070426 indicating a service has not started, despite services running as expected. Despite multiple installation attempts, Ubuntu does not appear to be registered correctly and fails to launch.

Diagnostic Logs

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!

Closed similar issues:

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

LemonadeGoneLime commented 2 months ago

Here are the diagnostic logs collected as requested. The logs were captured while attempting to install Ubuntu via WSL, which consistently fails with error 0x80070426, indicating that a service has not started. These logs should provide more insight into what might be causing this persistent issue.

I followed the log collection procedure using collect-wsl-logs.ps1 and encountered the error during the process, so the logs should reflect the state of the system at the time of the error.

Please let me know if further information is required.

WslLogs-2024-06-05_10-17-45.zip

github-actions[bot] commented 2 months ago
Diagnostic information ``` .wslconfig found Detected appx version: 2.1.5.0 ```
LemonadeGoneLime commented 2 months ago

Closing

OneBlue commented 2 months ago

This looks like an issue with the HNS service:

Microsoft.Windows.Lxss.Manager  Error   06-05-2024 07:19:22.579 "   "   "code:  
failurecount:   11
file:   D:\a\1\s\src\windows\wslcore\lib\NatNetworking.cpp
function:   
hr:     0x80070426
linenumber:     883
message:    ""HcnCreateNetwork {""""Success"""":false,""""Error"""":""""The service has not been started. """",""""ErrorCode"""":2147943462}""
threadid:   8144
type:   0
wslVersion:     2.1.5.0"    D:\a\1\s\src\windows\wslcore\lib\NatNetworking.cpp          4452    8144    2       00000000-0000-0000-0000-000000000000        

@keith-horton: Have you ever seen this before ?

chanpreetdhanjal commented 2 months ago

Hi. Can you please collect networking logs by following the instructions below? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

keith-horton commented 2 months ago

@LemonadeGoneLime : this failed to deploy the container when HNS tried to set DNS information on the interface - it failed with an error stating that the dnscache service was not running. Did you happen to manually stop/disable the dnscache service? That will be required to deploy a NAT container.