microsoft / WSL

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

WslRegisterDistribution failed with error: 0x80070057 #12107

Closed kurtismcc closed 1 month ago

kurtismcc commented 1 month ago

Windows Version

Microsoft Windows [Version 10.0.22631.4169]

WSL Version

2.3.24.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.153.1-2

Distro Version

Ubuntu

Other Software

No response

Repro Steps

wsl --install Ubuntu

(Note, error from logs is HcsCreateComputeSystem failed...

"HcsWaitForOperationResult for HcsCreateComputeSystem failed (06AE219D-3D5E-415E-8981-7825C3875F36 {""Owner"":""WSL"",""SchemaVersion"":{""Major"":2,""Minor"":3},""VirtualMachine"":{""StopOnReset"":true,""Chipset"":{""UseUtc"":true,""LinuxKernelDirect"":{""KernelFilePath"":""C:\Program Files\WSL\tools\kernel"",""InitRdPath"":""C:\Program Files\WSL\tools\initrd.img"",""KernelCmdLine"":""initrd=\initrd.img WSL_ROOT_INIT=1 panic=-1 nr_cpus=32 hv_utils.timesync_implicit=1 earlycon=uart8250,io,0x3f8,115200 console=hvc0 debug pty.legacy_count=0 WSL_ENABLE_CRASH_DUMP=1""}},""ComputeTopology"":{""Memory"":{""SizeInMB"":32308,""AllowOvercommit"":true,""EnableColdDiscardHint"":true,""EnableDeferredCommit"":true,""HighMmioBaseInMB"":49152,""HighMmioGapInMB"":16384,""HostingProcessNameSuffix"":""WSL""},""Processor"":{""Count"":32,""ExposeVirtualizationExtensions"":true,""EnablePerfmonPmu"":true}},""Devices"":{""ComPorts"":{""0"":{""NamedPipe"":""\\.\pipe\{6199505c-acdc-4fdb-98cd-7f8efd417065}""}},""VirtioSerial"":{""Ports"":{""0"":{""NamedPipe"":""\\.\pipe\{bbf78d32-27a6-46ba-83aa-278499f90114}"",""Name"":""hvc0"",""ConsoleSupport"":true},""1"":{""NamedPipe"":""\\.\pipe\wsl_debugshell_S-1-5-21-2115390225-1166050209-394841749-1002"",""Name"":""hvc1"",""ConsoleSupport"":true}}},""Scsi"":{""0"":{""Attachments"":{}}},""HvSocket"":{""HvSocketConfig"":{""DefaultBindSecurityDescriptor"":""D:P(A;;FA;;;SY)(A;;FA;;;S-1-5-21-2115390225-1166050209-394841749-1002)"",""DefaultConnectSecurityDescriptor"":""D:P(A;;FA;;;SY)(A;;FA;;;S-1-5-21-2115390225-1166050209-394841749-1002)""}},""Plan9"":{},""Battery"":{}}},""ShouldTerminateOnLastHandleClosed"":true} - error string: {""Error"":-2147024809,""ErrorMessage"":""The parameter is incorrect."",""ErrorEvents"":[{""Message"":""'' could not initialize. (Virtual machine ID 06AE219D-3D5E-415E-8981-7825C3875F36)"",""Provider"":""51ddfa29-d5c8-4803-be4b-2ecb715570fe"",""EventId"":3040,""Flags"":5,""Data"":[{""Type"":""String"",""Value"":""""},{""Type"":""String"",""Value"":""06AE219D-3D5E-415E-8981-7825C3875F36""}]}],""Attribution"":[{""OperationFailure"":{""Detail"":""Construct""}}]})")

Expected Behavior

Successful installation

Actual Behavior

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

Diagnostic Logs

WslLogs-2024-09-30_12-58-20.zip

github-actions[bot] commented 1 month ago

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
.wslconfig found
Detected appx version: 2.3.24.0

kurtismcc commented 1 month ago

Also of note, if I create a full Ubuntu machine in Hyper-V, it also fails to start, this time with error "The process terminated unexpectedly."

OneBlue commented 1 month ago

Thank you for reporting this @kurtismcc. It looks like something's wrong inside Hyper-V on your machine. To help root cause this, could you please:

kurtismcc commented 1 month ago

I couldn't wait. I reinstalled Windows and everything cleared up. Gonna close this.

hmxf commented 1 month ago

HyperVTrace.etl.zip

@OneBlue

I've met the same error and reproduced the WSL issue. The .etl file has been attached above.