Can't open wsl possibly after update "the data is invalid"
Version
Microsoft Windows [Version 10.0.22579.100]
WSL Version
- [X] WSL 2
- [ ] WSL 1
Kernel Version
No response
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
wsl.exe ->
Expected Behavior
Open a wsl console
Actual Behavior
The data is invalid.
Error code: Wsl/Service/CreateInstance/CreateVm/0x8007000d
Diagnostic Logs
No response
Exactly the same error. Cant run docker dosktop. Yesterday I updated win11. Everything was fine before the update.
Short fix (from another discussion I found) change the system date backwards in time
Fixed mine completely by downloading and installing another update
Strongest recommendation don’t do anything silly- your files are probably fine (mine were)
I used system date trick to back everything up in case though
Hell no! :D Big thanks! It really works
Can do you give link to that issue. Because it's not a real-world fix, because everything in win11 stop work with incorrect datetime.
If this is a Docker Desktop related issue it may not be caused by actual WSL layer.
powershell (or cmd) ">>> wsl" throws the same error
Docker speaks:

System.InvalidOperationException:
Failed to deploy distro docker-desktop to C:\Users\KRT\AppData\Local\Docker\wsl\distro: exit code: -1
stdout: The data is invalid.
Error code: Wsl/Service/CreateVm/0x8007000d
stderr:
at Docker.ApiServices.WSL2.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode) in C:\workspaces\PR-16360\src\github.com\docker\pinata\win\src\Docker.ApiServices\WSL2\WslCommand.cs:line 146
at Docker.Engines.WSL2.WSL2Provisioning.<DeployDistroAsync>d__17.MoveNext() in C:\workspaces\PR-16360\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\WSL2Provisioning.cs:line 168
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.WSL2.WSL2Provisioning.<ProvisionAsync>d__8.MoveNext() in C:\workspaces\PR-16360\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\WSL2Provisioning.cs:line 77
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__28.MoveNext() in C:\workspaces\PR-16360\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 180
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\PR-16360\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\PR-16360\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 67
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\PR-16360\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92
I think that is not a docker bug
I think that it's not a docker bug
It looks like a Docker Desktop bug. Can you reproduce the issue with a different Linux distribution from Windows Store after uninstalling Docker Desktop?
everything are same
This is also happening to me. Setting the date back in time fixed it.
Why I think this is happening
I wasn't able to update my system for months. Today, every action I take regarding the system configuration / administration now shows an UAC prompt (opening task manager, changing settings). Checking their exes, they all have one thing in common: the certificate they were signed with (Microsoft Windows) is valid until 2022-09-15. I think some WSL-related binary was signed with that certificate and some check is failing because of that.
This won't happen if your machine is properly updated
This is happening because you are stuck on a very old Windows Insiders build (from March). Fix is to make sure you install a more recent version of Windows.
Nope, that's not true, as i'm in 25179.1000 and it failing for me too, and the update KB2267602 is giving me a wrong date or time error too, so maybe is realted to other problem too
Okay, seems that updating the system solves the problem, that build expires on 15/09/2022 To do that change the date and try to update
Ok, solve to me:
1 - Travel to 14/09/2022 in my windows
2 - Open powersheel and execute: wsl update
3 - Travel back today
Ok, solve to me:
1 - Travel to 14/09/2022 in my windows 2 - Open powersheel and execute:
wsl update3 - Travel back today
when i do this, i am getting error:
the data is invalid
Error code: Wsl/Service/CreateInstance/CreateVm/0x8007000d
I have latest windows updates
please help to solve this and dont lose ubuntu data
Ok, solve to me:
1 - Travel to 14/09/2022 in my windows 2 - Open PowerShell and execute:
wsl update3 - Travel back today
Not sure why changing the date works; whatever it is, it needs to be fixed.
Ok, solve to me:
1 - Travel to 14/09/2022 in my windows 2 - Open powersheel and execute:
wsl update3 - Travel back today
That's totally insane, but this is what helped me after doing all other instructions.
Thanks for reporting this @jameschapman19. This is unfortunately a Windows issue, it can only be solved by updating your Windows build.