microsoft / WSL

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

Error: 0x80070002 The system cannot find the file specified #11962

Open SlyckLizzie opened 3 months ago

SlyckLizzie commented 3 months ago

Windows Version

10.0.22631.4037

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.153.1-2

Distro Version

any

Other Software

Docker Desktop Citrix Workspace

Repro Steps

wsl --install kali-linux

Kali Linux Rolling is already installed. Launching Kali Linux Rolling... Installing, this may take a few minutes...

WslRegisterDistribution failed with error: 0x80070002 Error: 0x80070002 The system cannot find the file specified.

Expected Behavior

distro should install without error

Actual Behavior

Distro fails with this error

WslRegisterDistribution failed with error: 0x80070002 Error: 0x80070002 The system cannot find the file specified.

Diagnostic Logs

WslLogs-2024-08-26_18-27-31.zip

github-actions[bot] commented 3 months ago

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

Diagnostic information ``` Detected appx version: 2.2.4.0 Found evidence of HcnCreateNetwork failure: HcnCreateNetwork {"Success":false,"Error":"The system cannot find the file specified. ","ErrorCode":2147942402}. HResult: 0x80070002 ```
silver2row commented 2 months ago

I had this error and more. I lost all my data trying to configure what I thought was a workaround. Of course, I was wrong in my attempts, i.e. as it was indescribable to me at that point.

In my last attempts, after losing all data, I just erased the WSL2 instance via terminal application and then reinstalled each lib. I had, or some of them, via another route. I tried to downgrade kernels, upgrade kernels, and then ultimately took the bite of not enough time to dedicate to the issue.

I hope you guys/gals figure it out. I could not get past the error.

CatalinFetoiu commented 2 months ago

thanks for reporting the issue can you please collecting networking logs using https://github.com/microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1. please follow instructions below (note the RestartWslReproMode flag)

.\collect-networking-logs.ps1 -RestartWslReproMode $true reproduce the issue stop .\collect-networking-logs.ps1

Collect and share the zip generated by the script - it will have a name starting with "WslNetworkingLogs"