I encountered an error starting WSL with Ubuntu 22.04.3 LTS (GNU/Linux 5.15.133.1-microsoft-standard-WSL2 x86_64)
Detais:
Falha ao configurar a rede (networkingMode Nat). Para desabilitar a rede, defina ‘wsl2.networkingMode=None’ no C:Usersusuario.wslconfig
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0x80070424
I’ve successfully resolved this issue and wanted to share the solution for anyone who might face a similar problem.
Solution:
- remove Optional Features: Hyper-v platform and Hyper-V managment tool
- reboot
- start WSL: terminal: wsl.exe –install –no-distribution
- reboot
Source: https://github.com/microsoft/WSL/issues/10755
If anyone has experienced this error or has additional insights, feel free to share your thoughts!
2
Answers
Found an easier solution from https://github.com/microsoft/WSL/issues/10495:
A potential workaround is to use bridged mode (if acceptable). It took only few minutes.
Created a new virtual switch using Hyper-V Manager -> Virtual Switch Manager (see below few steps) + make a small change to
.wslconfig
change:
c:users<USER>.wslconfig
to include 2 more lines:Create New Virtual Switch: Choose the type of virtual switch you need ( ‘External’) and click on ‘Create Virtual Switch’.
Configure the Virtual Switch:
Name your virtual switch (in my case I named it "
wsl_switch
" see above)If you chose an external switch, select the network adapter (NIC) you want to use.
There will be a prompt warning about network connectivity disruption. Click ‘Yes’ if you agree to proceed.