microsoft / WSL

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

WSL doesn't start #12046

Open roberto-aquino-itti opened 1 month ago

roberto-aquino-itti commented 1 month ago

Windows Version

Microsoft Windows [Versión 10.0.19045.4894]

WSL Version

2.2.4

Are you using WSL 1 or WSL 2?

Kernel Version

No response

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

Open a Ubuntu terminal.Ubuntu starts up normally and I am in my home directory.

Expected Behavior

Ubuntu starts up normally and I am in my home directory.

Actual Behavior

Get this error No se pudo configurar la red (networkingMode Nat). Para deshabilitar las redes, establezca "wsl2.networkingMode=None" en .wslconfig Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0xffffffff

Diagnostic Logs

WslLogs-2024-09-17_18-23-45.zip

github-actions[bot] commented 1 month ago

The logs show that the VM failed to start because the HNS network couldn't be created. Adding network tag

Diagnostic information ``` .wslconfig found Detected appx version: 2.2.4.0 Detected user visible error: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0xffffffff Found evidence of HcnCreateNetwork failure: HcnCreateNetwork (null). HResult: 0xFFFFFFFF ```
CatalinFetoiu commented 1 month ago

thanks for reporting the issue. can you please collect 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"

Raven-Singularity commented 1 month ago

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.