WSL: Cannot upgrade to WSL 2, I'm getting this error (The system cannot find the file specified.)
Environment
Windows build number: Microsoft Windows [Version 10.0.19042.685]
Your Distribution version: Release: 20.04
Whether the issue is on WSL 2( WSL 1 works fine) : Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #488-Microsoft Mon Sep 01 13:43:00 PST 2020
Steps to reproduce
- I have two partition, C and D. by default ubuntu wsl 2 installed on C drive and I was using it without any problems, then two weeks before my C drive started to full, so I tried to move wsl distro to D drive [followed this->] (https://github.com/MicrosoftDocs/WSL/issues/412#issuecomment-708142542).
- This method worked fine and I was using wsl2 ubuntu without any problems. Then two days before again the C drive started to full.
- This time I took a backup of the (Ubuntu.vhdx file, i just moved it to my external drive) and deleted the entire D drive and and extended C drive to get space.
- Then I installed wsl2 ubuntu from store and it is installed to C drive, now I overwrite the ubuntu file located under C:\Users<username>\AppData\Local\Packages<distro-name>\localstate\distro.vhdx (This time I didn’t followed this (https://github.com/MicrosoftDocs/WSL/issues/412#issuecomment-708142542) I simply overwrited the .vhdx file)
- Now the problem Started.
WSL logs: This is my feedback https://aka.ms/AAamegk
Expected behavior
I want to use wsl 2 distros instead wsl 1.
Actual behavior
If I install any distro from Microsoft store, by setting WSL version 1 by default, then i can install any distro and works fine.
Like in this image

If I change WSL default version to 2 then installing any version gives this error.
Same will happen even after installing distro as WSL version 1 then upgrading to WSL version 2.

Any fixes I tried before opening this issue?
Yes,
- Uninstalled Virtaul box, Vmware, Docker desktop then rebooted, fixed? NO.
- Uninstalled all Vbox/VMware Network Drivers, fixed? NO
- Removed all the distro by wsl --unregister <distro name> and also from settings -> apps --> <distro name> Uninstall, then freshly installed from microsoft store. fixed? NO.
- Again did the above steps, along with removed wsl 2 update package(kernel), fixed? NO. Finally, Again Uninstalled everything like 3rd step, also turned off Windows Optional Features ( Windows Subsystem for Linux , Virtual Machine Platform, Windows Hypervisor Platform) and did everything from first following this https://docs.microsoft.com/en-us/windows/wsl/install-win10 fixed, NO.
I don’t understand anything, say in simple words, From where/when the problem started?
After I overwrite my backed-up ubuntu.vhdx file with the freshly installed ubuntu.vhdx file.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 24 (2 by maintainers)
@benhillis The error is raised when creating the network. HcnCreateNetwork failed {“Success”:false,“Error”:"The system cannot find the file specified. ",“ErrorCode”:2147942402}
@nagarajcruze I don’t know too much about the networking. Here are two workarounds from the community which may help on your problem:
netsh winsock resetandnetcfg -d