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

Unable to switch distro to run WSL2 #9153

Closed
2 tasks done
richylyq opened this issue Nov 15, 2022 · 7 comments
Closed
2 tasks done

Unable to switch distro to run WSL2 #9153

richylyq opened this issue Nov 15, 2022 · 7 comments
Labels

Comments

@richylyq
Copy link

richylyq commented Nov 15, 2022

Version

Microsoft Windows [Version 10.0.19045.2251]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.102.1

Distro Version

Ubuntu

Other Software

No response

Repro Steps

  1. Install WSL and Ubuntu Distro and change from WSL1 to WSL2
  2. Install WSL and change from WSL1 to WSL2 then install Ubuntu Distro

Expected Behavior

  NAME      STATE           VERSION
* Ubuntu    Stopped         2

Actual Behavior

C:\Windows\system32> wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
The system cannot find the file specified.
  1. Unable to install Ubuntu Distro
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070002
Error: 0x80070002 The system cannot find the file specified.

Press any key to continue...

Diagnostic Logs

No response

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 15, 2022

/logs

@ghost
Copy link

ghost commented Nov 15, 2022

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!

@richylyq
Copy link
Author

I've attached to log files.
WslLogs-2022-11-16_09-11-47.zip

@ghost ghost removed the needs-author-feedback label Nov 16, 2022
@OneBlue
Copy link
Collaborator

OneBlue commented Nov 21, 2022

Thank you @richylyq.

Looking at the logs, the issue is that WSL2 failed to create its network:

572	True	Microsoft.Windows.Lxss.Manager	Error	0	11-15-2022 17:15:24.022	12864	"code: 	
failurecount: 	3
file: 	onecore\vm\wsl\lxss\service\lib\utilityvmcontext.cpp
function: 	
hr: 	0x80070002
linenumber: 	1419
message: 	""HcnCreateNetwork failed {""""Success"""":false,""""Error"""":""""The system cannot find the file specified. """",""""ErrorCode"""":2147942402}""
threadid: 	12864
type: 	0"	"	"	onecore\vm\wsl\lxss\service\lib\utilityvmcontext.cpp			7552	2		00000000-0000-0000-0000-000000000000			

@keith-horton: I see this logline:

514	False	Microsoft.Windows.Hyper.V.NetMgmt	NetMgmt::CreateVirtualSwitch	0	11-15-2022 17:15:24.020	14504	"ErrorID: 	-2147024894
Message: 	CreateVSwitchExtensionMiniport call failed"	"	"				3032	2		00000000-0000-0000-0000-000000000000			

Just before the failure. Any hints on what could cause that ?

@richylyq
Copy link
Author

hey @OneBlue
Thanks for checking up on the issue! Much appreciated!
I ended up resetting the PC and it resolved the problem. Marking the issue as resolved 🚀

@keith-horton
Copy link
Member

Sorry, that's an odd error to show up there. I would need to get hyper-v traces to see where it failed.

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 24, 2022

@keith-horton the logs should contain the hyper-v traces.

Let me know if any other trace providers are needed to diagnose issues like this

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

3 participants