WSL: Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/ERROR_UNHANDLED_EXCEPTION
Windows Version
Microsoft Windows [Version 10.0.19045.4170]
WSL Version
2.1.5.0
Are you using WSL 1 or WSL 2?
- WSL 2
- WSL 1
Kernel Version
5.15.146.1-2
Distro Version
Ubuntu (22.04)
Other Software
No response
Repro Steps
I was trying to setup LAN Network Bridge in ‘Network and Sharing Center’ again after hardware change forced windows 10 reset, then suddenly lost networking ability in WSL. I’ve tried suggested fixes from the following issue#: #10709 #10495 #10755 #10764, none of which have worked besides creating a .wslconfig file, and setting networkingMode=none
[experimental]
autoMemoryReclaim=gradual # gradual | dropcache | disabled
networkingMode=none # mirrored | NAT | None
#dnsTunneling=false
#firewall=false
#autoProxy=true
#[wsl2] # omit that if you already have it.
#networkingMode=bridged
#vmSwitch=wsl_switch
Expected Behavior
Actual Behavior
Diagnostic Logs
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 26 (7 by maintainers)
Sorry, it looks like your Hyper-V configuration is in some broken state. I would recommend removing all Hyper-V related features, then adding them back to get into a known working state. This does mean that if you have VMs, you’ll want to ensure they are backed up correctly first.
Same with your Linux distros. (always good to have backups!)
That would mean removing the optional components for Hyper-V, Virtual Machine Platform, Windows Sandbox, Microsoft Defender Application Guard, Windows Subsytem for Linux.
@alohith, Were you able to get this resolved? I’m no expert on this, but I’ll share a couple things that worked for me. Hopefully it helps someone. In both these solutions I have the following Windows features enabled: Hyper-V, Virtual Machine Platform, and Windows Subsystem for Linux. As a side note, I also have NordVPN running and both the following solutions still worked.
This documentation helped me, WSL Networking Documentation
Host Machine: Window 11 23H2 22631.3296
My wsl
My .wslconfig. - Your config doesn’t need all these setting, but add them as needed.