Open convergerutley opened 1 month ago
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.
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!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
I have emailed the files.
thanks for reporting the issue. can you please collecting networking logs using instructions below?
download https://github.com/microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1 run .\collect-networking-logs.ps1 -RestartWslReproMode $True start WSL stop collect-networking-logs.ps1 share the zip generated by the script
Did you by any chance install VMware Workstation?
That broke my WSL networking, even after uninstalling VMware. It left behind a registry key which prevented virtual network adapters from being created.
This is the registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{3d09c1ca-2bcc-40b7-b9bb-3f3ec143a87b}
After removing this registry key, then clicking Network Reset
on the Networking Control Panel page, my system came back up with WSL2 able to start a virtual network again.
Maybe try a Network Reset
, and if that doesn't work, check if you have that registry key and remove it, then reboot.
To be clear: the issue is that there is that WSL is unable to create a Hyper-V virtual networking adapter for WSL to connect to the Internet with.
If you don't actually need the Internet, you can disable WSL networking by adding this to C:\Users\YourUserName.wslconfig:
[wsl2]
wsl2.networkingMode=None
I was having the same error. Have never had VMWare installed and don't have the registry key mentioned above. I had to tweak the WSL config to say the following (not quite what's written above). Obviously that leaves me without network but that's fine for my use case. I also have the 2024-09 preview installed.
[wsl2]
networkingMode=None
As a note from a Nix Wsl user. if anyone facing the same issue and want internet to work with it:
.wslconfig
in your windows userdir. (type cd ~
in powershell and enter)[wsl2]
networkingMode=mirrored
configuration.nix
:
wsl.usbip.snippetIpAddress = "127.0.0.1";
winget install usbipd
Windows Version
Microsoft Windows [Version 10.0.22631.4169]
WSL Version
2.2.4.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.153.1-2
Distro Version
Kali
Other Software
No response
Repro Steps
Running wsl, kali, or docker engine
Expected Behavior
WSL distro to start
Actual Behavior
Failed to configure network (networkingMode Nat). To disable networking, set
wsl2.networkingMode=None
in C:\Users\USER.wslconfig Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0x80041002 Press any key to continue...Diagnostic Logs
I have sent my logs to wsl-gh-logs@microsoft.com with the subject line "WslLogs-2024-09-11_12-29-53 GitHub Issue"