WSL: WslRegisterDistribution failed with error: 0x80070057

Version

Microsoft Windows [Version 10.0.22581.100]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.102.1

Distro Version

Debian using wsl --install Debian

Other Software

None

Repro Steps

uninstall wsl prview from store

open command line and run wsl --install then run wsl --install Debian

get

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070057
Error: 0x80070057 The parameter is incorrect.

Press any key to continue...

Expected Behavior

Debain should install just fine.

Actual Behavior

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070057
Error: 0x80070057 The parameter is incorrect.

Press any key to continue...

Diagnostic Logs

https://aka.ms/AAgk6ot

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18

Most upvoted comments

I know this is flagged as closed, but it’s the top google hit for this issue for 2022. I just ran into this issue because of a network adapter on my computer. I ended up disabling the adapter installing Ubuntu and then enabling the adapter, and I was able to get things up and going. If someone else runs into this issue make sure you don’t have any non-standard adapters enabled.

Seeing this error and not sure how to fix. Windows 11 build 25905 WSL2 Ubuntu

This is caused by a Hyper-V bug that made it to Windows insider builds. Either downgrading to an older build or waiting for the next update should solve the issue.

Bridge networking in WSL is still very experimental (and not even officially released), but right now we have no plans to make bridged the default network mode

@OneBlue thanks, interesting, at the time the logs were created the switch existed in the hyper-v switch manager when i was tearing down networking and other things at the weekend i got weird errors trying to edit that switch and in the end did a full netsh network stack reset and removing the switch

i just recreated the switch and now all is good

1.) i think something broken the hyper-v switch (i have noticed that the hyper-v network infrastructure can get very freaked out by build to build upgrades - i have other comments in other threads - last time i had a repro of a upgrade / longhaul break i ping craig but he never replied (more than willing to let someone do a remote dbg). I think this caused the initial issue as it was in the UI - but apparently borked under the hood.

  1. maybe improving the returned error message would help - in this scenario if it had said ‘switch foo’ doesn’t exist - i would have recreated…

I can close this as fixed - next time i have a general longhaul break in the network stack (like when DNS fails in WSL) should i ping someone?

oh @OneBlue And TBH having a switch like this is essential given the default behaviour of wsl2… https://blog.alexbal.com/ 😃 when will this be the default behaviour - proper bridging?