microsoft / WSL

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

WSL will not start after recent update due to network error #10895

Open brettw1234 opened 11 months ago

brettw1234 commented 11 months ago

Windows Version

Microsoft Windows [Version 10.0.22621.2792]

WSL Version

WSL version: 2.0.9.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.133.1-1

Distro Version

Ubuntu (unsure of version, cannot start WSL to verify)

Other Software

No response

Repro Steps

This error happens when trying to start WSL. No additional steps are required. I have none of the Hyper-V Windows features enabled, but did confirm that Virtual Machine Platform is enabled.

Expected Behavior

I expect WSL start up without an error.

Actual Behavior

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

Diagnostic Logs

I have a zip of the networking logs that I collected using the steps here but the file is too large (cap is 25MB and my zip is 27MB). Is there another place I can upload? Or can you share which of the files would be OK to remove? Looks like the largest file in there is logs.etl and the next largest is pktmon.etl.

github-actions[bot] commented 11 months ago

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.

OneBlue commented 11 months ago

@brettw1234: If the .zip file is too big, you can try to upload it OneDrive / Gdrive

brettw1234 commented 11 months ago

@brettw1234: If the .zip file is too big, you can try to upload it OneDrive / Gdrive

Ok thanks - didn't know if you guys had issues using an external hosting platform. Here is a link to the logs for my issue.

novice2194 commented 10 months ago

Hello, have you resolved this issue? I have also encountered the same problem.

brettw1234 commented 10 months ago

Hello, have you resolved this issue? I have also encountered the same problem.

Nope. I've just disabled networking in order to continue using my WSL2 instances, but I would love to have the issue resolved!

ACGNnsj commented 10 months ago

Just disable all related features other than "Virtual Machine Platform".

brettw1234 commented 9 months ago

I'm not sure if it this is related, but just a few weeks after reporting this issue the networking on my entire Windows install broke. The Windows DnsClient service refused to start due to an "Access Denied" error, and no amount of debugging got that working. I now have a new Windows install and everything seems to be working again.

ACGNnsj commented 9 months ago

I'm not sure if it this is related, but just a few weeks after reporting this issue the networking on my entire Windows install broke. The Windows DnsClient service refused to start due to an "Access Denied" error, and no amount of debugging got that working. I now have a new Windows install and everything seems to be working again.

I don't think so, the original problem was that the virtual switch cannot be created, which would not affect the host's network status. And reinstallation will always work for such problems.

keith-horton commented 7 months ago

Sorry - I missed this report. This is failng deep in virtual switch. As of the information we have I don't know what is causing the failure :(

I would recommend 2 things:

  1. check to see if you have 'ghost' adapters and remove them ---> from Device Manager, click "View" --> "Show hidden device" --> refresh and expand "Network adapters" --> if there are any 'ghosted'/'hidden' adapters, uninstall them.
  2. I would just remove vswitch completely and try reinstalling. this would mean removing all "HyperV" optional components, "Virtual Machine Platform" optional component, "Windows Sandbox" optional component, and "MDAG" or "Microsoft Device Application Guard" (all of these require vswitch) ---> if you do this, you'll of course need to backup any virtual machines that you have.

Hope this helps.

MHamzaRajput commented 1 month ago

I delete the file .wslconfig in C:\Users{USER_NAME} and WSL back into working state.