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: 0x8007023e #10507

Open
1 of 2 tasks
pszlaga opened this issue Sep 19, 2023 · 21 comments
Open
1 of 2 tasks

WslRegisterDistribution failed with error: 0x8007023e #10507

pszlaga opened this issue Sep 19, 2023 · 21 comments
Assignees
Labels

Comments

@pszlaga
Copy link

pszlaga commented Sep 19, 2023

Windows Version

Microsoft Windows [Version 10.0.19045.3324]

WSL Version

1.2.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.90.1

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

wsl -d Ubuntu-20.04

Expected Behavior

It will launch Ubuntu 20.04.

Actual Behavior

{Błąd aplikacji} W aplikacji wystąpił wyjątek %s (0x
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/0x8007023e

Diagnostic Logs

WslLogs-2023-09-20_00-02-31.zip

@ghost ghost self-assigned this Sep 19, 2023
@ghost
Copy link

ghost commented Sep 19, 2023

I don't see anything in the traces. Did you let the log collection run while launching wsl?

@ghost ghost removed their assignment Sep 19, 2023
@pszlaga
Copy link
Author

pszlaga commented Sep 19, 2023

I don't see anything in the traces. Did you let the log collection run while launching wsl?

https://aka.ms/AAmqjfp

what more do you need?

@ghost
Copy link

ghost commented Sep 19, 2023

@pszlaga, what I need is for the log collection program to run while you run commands on/inside wsl. If you immediately exit the log collection, I don't get to see anything.

@ghost
Copy link

ghost commented Sep 19, 2023

/logs

@microsoft-github-policy-service
Copy link
Contributor

Hello! Could you please provide more logs to help us better diagnose your issue?

To collect WSL logs, download and execute 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

Thank you!

@pszlaga
Copy link
Author

pszlaga commented Sep 19, 2023

Oh, i'm sorry, my bad.

Now you have new logs in attachment

WslLogs-2023-09-20_01-07-59.zip

@ghost
Copy link

ghost commented Sep 19, 2023

@keith-horton, can you triage or delegate triage? This is pre mirrored and shows errors on hns-create*

@keith-horton
Copy link
Member

It's failing to create the switch (network). @pszlaga , can you collect a trace using this WPR script https://github.com/microsoft/WSL/blob/master/diagnostics/wsl_networking.wprp? We need some network-specific traces:

wpr -start wsl_networking.wprp -filemode

wpr.exe -stop wsl_repro.etl

@pszlaga
Copy link
Author

pszlaga commented Sep 20, 2023

wsl_repro.zip

@pszlaga
Copy link
Author

pszlaga commented Sep 25, 2023

Hello, do you have any solutions?

@keith-horton
Copy link
Member

Sorry - I reviewed the traces and opened an issue with the Hyper-V VSwitch team. Their traces don't show the source of the error - only that it's failing trying to create that NAT network.

Given this I'm trying to find a way to unblock you. This continue to repro after a reboot?
If so, what optional-features do you have installed? I would try to remove Hyper-V if possible (if it doesn't break you or lose hard-to-recover configurations).
These Windows Features all install vSwitch: Hyper-V, Microsoft Defender Application Guard, Virtual Machine Platform, Windows Sandbox.

WSL requires Virtual Machine Platform - though you can have others installed as well.

If it doesn't risk you losing data, and just a reboot won't fix this, I would remove the features above, reboot, then add what you need back.

I'm sorry I don't have a better work-around available.

@pszlaga
Copy link
Author

pszlaga commented Sep 25, 2023

I have everything disabled except:

  • Windows subsystem for linux
  • Virtual machine platform

I uninstalled the above and reinstalled it.

I also removed WSL and reinstalled it via PowerShell.

I used the commands:

netcfg -d
winsock reset

Unfortunately, nothing helps.

Additionally, I removed the network card drivers and installed them again, but this did not solve the problem. I uninstalled VPN, VirtualBox, same problem.

Tell me, am I able to recover files from a vhdx disk when the system was Ubuntu 20.04?

wsl export also returns the same error as when I want to start the machine.

@keith-horton
Copy link
Member

Wow. sorry it's been so painful. The traces suggest something may be crashing. could you follow this to see if there's something crashing - and collect the dmp?

https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#11-reporting-a-wsl-process-crash

@pszlaga
Copy link
Author

pszlaga commented Sep 25, 2023

I followed point number 11 step by step, but my crashes folder is empty?

@agxpro
Copy link

agxpro commented Sep 30, 2023

I'm facing the same issue after updating Windows 11 to KB5030310 (OS Build 22621.2361) Preview. None of the virtualization apps are working including WSL2, Windows Sandbox, VMware.

@keith-horton
Copy link
Member

Sorry, I don't know what is causing vswitch to immediately fail to create a switch. All I can recommend at this point is to call to Windows OS support :(

@afifafifafifafifali
Copy link

Try starting WSL in Safe mode. Image
Uploading Screenshot (209).png…

@afifafifafifafifali
Copy link

Go to WSL settings app. Go to optional settings and enable safe mode.
Hope this helps.

@congcnit
Copy link

congcnit commented Aug 21, 2024

I wanted to run Docker on my Windows machine but encountered a similar issue.
After a few attempts, I discovered that I couldn’t install distributions in version 2, but with version 1, it was fine.
wsl --set-default-version 1
wsl --install
After successfully installing the distribution and launching Docker Desktop, I still faced a network error. However, after following the recommendation from Docker Desktop’s notification to add the networkingMode=None option to the .wslconfig file, I am now able to use Docker Desktop.
I hope this information might be helpful to you or others in a similar situation.
image
C:\Users\cong.nguyen\.wslconfig
image

@afifafifafifafifali
Copy link

I wanted to run Docker on my Windows machine but encountered a similar issue. After a few attempts, I discovered that I couldn’t install distributions in version 2, but with version 1, it was fine. wsl --set-default-version 1 wsl --install After successfully installing the distribution and launching Docker Desktop, I still faced a network error. However, after following the recommendation from Docker Desktop’s notification to add the networkingMode=None option to the .wslconfig file, I am now able to use Docker Desktop. I hope this information might be helpful to you or others in a similar situation. image C:\Users\cong.nguyen\.wslconfig image

In my case, it won't work.
Many of wsl users have issues like me.

@afifafifafifafifali
Copy link

Go to WSL settings app. Go to optional settings and enable safe mode. Hope this helps.

Download the wsl from github.

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

No branches or pull requests

6 participants