Open Falseclock opened 2 years ago
That error is coming from the method call "HcnCreateNetwork", found in HCN.ps1. I did not actually write that code... I copied it from https://www.powershellgallery.com/packages/HNS/, as mentioned in the README.
I think you would get this error if you ran the "Register-DeterministicNetworks.ps1" script after WSL already was started on your system. The script needs to be executed before WSL is started in a user session, so that WSL will "think" that it's network already is created. You are meant to use "Install-DeterministricNetwork.ps1" to install the "Register-DeterministicNetwork.ps1" script as a scheduled task.
If you did use "Install-DeterministicNetwork.ps1" script, you have rebooted your system, and you still are getting this error, I am not sure what the cause might be. Maybe you have some other actions running at startup time that are starting WSL before this script can run? This error also could occur on a multi-user system like a Windows Server running as a remote desktop host... I did not plan for that scenario.
Really I am hoping that Microsoft just fixes this crap so that solutions like this are not needed much longer.
Hi!
What to so with this error?