-
Notifications
You must be signed in to change notification settings - Fork 822
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
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/E_ACCESSDENIED #11980
Comments
The logs show that the VM failed to start because the HNS network couldn't be created. Adding network tag Diagnostic information
|
+1, on arm64 with Version 24H2 (Build 26100.1591)
Update: I also don't see the NetAdapter for WSL, any way to create that manually once before continuing?
|
For now, locally, I'm working around this by setting the following in my Maybe it helps someone:
Update |
Same issue here with the exact same versions as above, and yes |
@martin-labsky FYI, for me switching back to nat mode worked again after working on mirrored. Might be worth the attempt, as mirrored mode is still somewhat in beta. |
@maxboone Switching to mirrored and back to nat did the trick for me to. |
@thastad , thanks for reporting the issue. can you please collecting networking logs using instructions at https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues ? The script will create a zip with name starting with "WslNetworkingLogs" |
@CatalinFetoiu logs attached |
Diagnostic information
|
The issue seems to be related to Host Network Service, I found the problem happens occasionally and can be resolved temporarily (until next reboot) by go to Service (either using task manager or MMC), locate service |
Thanks @dingwen07! Restarting the Host Network Service ( The error code for this issue ends with |
Switching between networkingModes did not help for me. However, restarting the Host Network Service (thanks @dingwen07) did it for me. Starting WSL the first time after the restarting the service logs these messages:
Not sure if that's normal or not. |
I ran into this issue after updating from Windows 11 23H2 to Windows 11 24H2. Disabling "Virtual Machine Platform" in Windows features and then re-enabling it ended up fixing this issue for me. Interestingly enough a new virtual network adapter appeared called "vEthernet (WSL (Hyper-V Firewall))" after I did this. |
Thank you @Mk-rbv I had to disable both Virtual Machine Platform and Windows Hypervisor Platform, reboot, then enable again and reboot. WSL is working again. |
Another case here after updating from 23H2 to 24H2, restarting the Host Network Service did not work for me. After disabling Virtual Machine Platform, rebooting, re-enabling it, and rebooting again WSL negotiated a new address in the reserved 172.16.0.0/12 block and things are back to working. |
I only had these Hyper-V features enabled for shrinking WSL VHDs when I ran into the issue, so it might specifically be the Services one. It'd be good for someone who's run into it since updating to 24H2 to grab their logs before resolving it. |
Restarting "Host Network Service" fixed it for me. |
I've been running into it since a cumulative update this morning (KB5044284). Not sure if it's entirely what you meant, but might still prove useful. |
thanks all for reporting the issue and sending logs We are aware of the problem and we are working on a fix. We will update this thread when the fix will be available |
Same here |
As a note from a Nix Wsl user. if anyone facing the same issue and want internet to work with it:
[wsl2]
networkingMode=mirrored
wsl.usbip.snippetIpAddress = "127.0.0.1";
|
I also tried all the above workarounds, none of them worked :-( However what worked for me (for some reason): I just installed another distro (in my case Ubuntu 24.04 LTS). The installation seems to fix the issue for me. Hope it helps any of you guys, too :-) |
After upgrade to Windows 24H2 I have this issue with wsl.
|
24H2 update broke my setup as well, before that I was using the mirrored mode without problems, including ipv6 and host dns. Shutting down wsl and restarting Host Network Service works. If the network does not come up first time doing it, I try until it works. In optional windows features, I have
Restarting Host Network Service on Services.msc, first time
Restarting Host Network Service on Services.msc, second time
|
It helped to create a
wsl --version
|
I had the same issue and mirrored networkingMode was fine, but only temporary - after some network issues, it stopped working at all I've decided to try restarting Host Network Service and after that everything works fine (without mirrored) |
There are two workarounds for this:
Add one of the following to
|
Windows Version
Microsoft Windows [Version 10.0.26100.1591]
WSL Version
2.2.4.0
Are you using WSL 1 or WSL 2?
Kernel Version
No response
Distro Version
Ubuntu
Other Software
No response
Repro Steps
C:\Windows\System32>wsl.exe
Expected Behavior
Wsl default distro is launched.
Actual Behavior
Kan ikke konfigurere nettverk (networkingMode Nat). Hvis du vil deaktivere nettverk, angir duwsl2.networkingMode=None i C:\Users\trond.wslconfig
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/E_ACCESSDENIED
Error message is in norwegian but transelate to "can not configure network (networkingMode Nat) you can disable networking in .wslconfig"
Similar error message on every distro i try to start.
WSL was working a week ago and no configuration changes since then.
The system has been updated with "Win 11 version 24H2 KB5041865" and a HP bios update since last time wsl was working
Diagnostic Logs
WslLogs-2024-08-30_22-04-13.zip
The text was updated successfully, but these errors were encountered: