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

WSL Startup/Networking Failure - Error Code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0xffffffff #11334

Closed
1 of 2 tasks
brianjlacy opened this issue Mar 21, 2024 · 12 comments
Labels

Comments

@brianjlacy
Copy link

Windows Version

Microsoft Windows [Version 10.0.22631.3296]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

Ubuntu

Distro Version

No response

Other Software

No response

Repro Steps

> wsl
Failed to configure network (networkingMode Nat). To disable networking, set `wsl2.networkingMode=None` in C:\Users\...\.wslconfig
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0xffffffff
  • WSL 2 was working for me prior to the 2024-03 Cumulative Update for Windows 11 Version 23H2 (KB5035853) update.
  • Virtual Machine Platform is already installed.
  • Windows Hypervisor Platform was NOT checked/installed; I tried installing and rebooting but the problem persists.
  • I tried adding a .wslconfig file as recommended by L-ingqin12 and others; problem persists.
  • I complete uninstalled VMP, WHP, and WSL itself, rebooted, then re-installed them, updated WSL, and rebooted. The problem persists.
> wsl --version

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

> wsl --list --verbose
  NAME      STATE           VERSION
* Ubuntu    Stopped         2

Expected Behavior

Ubuntu launches successfully (with functional NAT network support).

Actual Behavior

WSL Ubuntu fails to launch:

> wsl
Failed to configure network (networkingMode Nat). To disable networking, set `wsl2.networkingMode=None` in C:\Users\...\.wslconfig
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0xffffffff

Diagnostic Logs

No response

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

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. Thank you!

Open similar issues:

Closed similar issues:

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

@brianjlacy
Copy link
Author

@keith-horton Looks like you're one of the key people working on this?

I attempted to attach the WslNetworkingLogs zip file generated by the "collect-networking-logs.ps1" script. GitHub won't allow this; the file is 52 MB (limit is 25 MB). What files if any can I remove from the archive? Is there another way to send you the logs?

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 21, 2024

I attempted to attach the WslNetworkingLogs zip file generated by the "collect-networking-logs.ps1" script. GitHub won't allow this; the file is 52 MB (limit is 25 MB). What files if any can I remove from the archive? Is there another way to send you the logs?

You can use google drive / onedrive to upload logs if the file is too big.

/logs

@keith-horton
Copy link
Member

@brianjlacy , or you can email them to [email protected]

@brianjlacy
Copy link
Author

@brianjlacy , or you can email them to [email protected]

I've emailed the Google Drive link.

@keith-horton
Copy link
Member

keith-horton commented Mar 26, 2024

Thank you for the trace. SharedAccess is failing to start the DNS proxy due to failing to bind to 0.0.0.0:53. Can you see if you have something else already listening on port 53?

If you run "Get-NetUDPEndpoint", that might show you.

@keith-horton
Copy link
Member

Alternatively, you can enable dnsTunneling, which will avoid SharedAccess completely.

@brianjlacy
Copy link
Author

How do I enable DNS Tunneling?

This is causing me tremendous stress right now as I'm unable to use Docker Desktop. I was able to work around this for a couple of weeks, but now I'm to a point where I absolutely have to get Docker Desktop and WSL working.

@brianjlacy
Copy link
Author

Update:
Running Get-NetUDPEndpoint showed that something was indeed using port 53 -- a little utility I've used occasionally the years that acts as a DNS proxy for greater control over DNS on my local PC.

Removed it, and now WSL is working again.

@CatalinFetoiu
Copy link
Collaborator

closing since the issue is resolved

@CodeShane
Copy link

Thank you for the trace. SharedAccess is failing to start the DNS proxy due to failing to bind to 0.0.0.0:53. Can you see if you have something else already listening on port 53?

Thank you! Solved an WSL2/Docker issue for me as well

@nguyenminhtho911
Copy link

Try it:

  1. open cmd run as admin netstat -aon | findstr 53
  2. kill the process: taskkill /f /pid [PID]
  3. reopen Ubuntu

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