microsoft / WSL

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

WslRegisterDistribution failed with error: 0x8007023e #11716

Open CYST084 opened 2 months ago

CYST084 commented 2 months ago

Windows Version

Microsoft Windows [Version 10.0.19045.4529]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.153.1-2

Distro Version

Ubuntu 22.04 LTS, Ubuntu

Other Software

No response

Repro Steps

Open Terminal as administrator, run wsl --install Ubuntu-22.04 or wsl --install Ubuntu

Expected Behavior

For Linux distros, in my case Ubuntu to install and run successfully

Actual Behavior

Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\user> wsl --install Ubuntu-22.04 Installing: Ubuntu 22.04 LTS Ubuntu 22.04 LTS has been installed. Launching Ubuntu 22.04 LTS... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x8007023e Error: 0x8007023e {Application Error} The exception s (0x Press any key to continue... The installation process for distribution 'Ubuntu-22.04' failed with exit code: 1. Error code: Wsl/InstallDistro/WSL_E_INSTALL_PROCESS_FAILED

PS C:\Users\user> wsl --update Checking for updates. Updating Windows Subsystem for Linux to version: 2.2.4.

PS C:\Users\user> wsl --status Default Version: 2

PS C:\Users\user> wsl --version WSL version: 2.2.4.0 Kernel version: 5.15.153.1-2 WSLg version: 1.0.61 MSRDC version: 1.2.5326 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26091.1-240325-1447.ge-release Windows version: 10.0.19045.4529

PS C:\Users\user> wsl --install Ubuntu Installing: Ubuntu Ubuntu has been installed. Launching Ubuntu... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x8007023e Error: 0x8007023e {Application Error} The exception s (0x Press any key to continue... The installation process for distribution 'Ubuntu' failed with exit code: 1. Error code: Wsl/InstallDistro/WSL_E_INSTALL_PROCESS_FAILED

PS C:\Users\user>

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!

Open similar issues:

Closed similar issues:

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

CYST084 commented 2 months ago

WSL-Logs

WslLogs-2024-06-20_16-26-07.zip

github-actions[bot] commented 2 months ago

The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.

Diagnostic information ``` Detected appx version: 2.2.4.0 Found no WSL traces in the logs ```
CYST084 commented 2 months ago

Updated WSL-Log

WslLogs-2024-06-20_16-35-18.zip

github-actions[bot] commented 2 months ago
Diagnostic information ``` Detected appx version: 2.2.4.0 ```
CYST084 commented 2 months ago

Nothing helpful so far, anyone who has experienced similar issue and resolved it, kindly reach out.

OneBlue commented 1 month ago

Looks like this is caused by an HNS issue:

Microsoft.Windows.Lxss.Manager  Error   06-20-2024 06:35:47.165 "   "   "code:  
failurecount:   56
file:   D:\a\1\s\src\windows\wslcore\lib\NatNetworking.cpp
function:   
hr:     0x8007023E
linenumber:     885
message:    ""HcnCreateNetwork {""""Success"""":false,""""Error"""":""""{Application Error} The exception s (0x"""",""""ErrorCode"""":2147942974}""
threadid:   4748
type:   0
wslVersion:     2.2.4.0"    D:\a\1\s\src\windows\wslcore\lib\NatNetworking.cpp          10176   4748    2       00000000-0000-0000-0000-000000000000        

Adding the networking tag

keith-horton commented 1 month ago

Sorry, this is similar to https://github.com/microsoft/WSL/issues/10507, where vswitch failed to create a NAT switch. It's not clear from the traces why this is failing. If you collect networking-logs, we might get more information. https://github.com/microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1