rancher-sandbox / rancher-desktop

Container Management and Kubernetes on the Desktop
https://rancherdesktop.io
Apache License 2.0
6.01k stars 283 forks source link

Rancher Desktop fails to import rancher-desktop distro on start-up #2175

Open the-dag opened 2 years ago

the-dag commented 2 years ago

I suspect, but this is speculative, Microsoft pushed updates that broke WSL kernel version 2 and/or rendered it incompatible with Rancher Desktop, so it's difficult to say if the issue belongs to you or to Microsoft. But something broke and my previously working installation of Rancher Desktop started to fail on startup, with diagnostics that mean little to me:

Error: wsl.exe exited with code 4294967295

Last command run:
wsl.exe --import rancher-desktop C:...\AppData\Local\rancher-desktop\distro C:\...\Rancher Desktop\resources\resources\win32\distro-0.21.tar --version 2

(where I've removed part of the path, I do find the tar file on my disk in the expected location).

I've attempted a few things but the behavior remains the same in all cases:

Sorry for the inconvenience if this (as I suspect may be the case) is really on Microsoft, but I reckon it's somewhat useful for you guys to know about users having this issue even if there may not be all that much you can do about it. Any suggestions to any troubleshooting I can do that I haven't already tried is welcome.

the-dag commented 2 years ago

FWIW, wsl --install -d debian works just fine, but I think this uses "WSL kernel version 1" (though I don't really understand what this is, not knowing how WSL actually works).

mook-as commented 2 years ago

Hmm, could you try running the actual command (wsl.exe --import …) and let us know what the actual output is?

If you now have Debian installed, you may also want to try wsl --list --verbose to check the version, and wsl --set-version Debian 2 to see if you can switch it to WSL 2.

(For reference: WSL1 is kind of like Wine: Windows implements the Linux ABI. WSL2 is just running a VM. We do not support WSL1, since it doesn't implement the APIs necessary.)

the-dag commented 2 years ago

Thanks for the quick response.

Copied verbatim the command does not parse, due to a space in a path under "Rancher Desktop", but when I put the path in quotes I get WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel.

So by all indications it is with WSL itself I have a beef. I was kinda hoping you might hear this from many users, have some communication channels to Microsoft and, with a real understanding of how this all works, perhaps be able to help Microsoft make a fix...

Attempting to switch Debian to version 2 results in

Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel

which is just more confirmation there's some issue with version 2.

I know it isn't really on you, but do you know where would be the best place to report this issue to Microsoft?

mook-as commented 2 years ago

Hmm, in that case you need to run wsl --update (as Administrator).

We've also seen this (#1867); I believe the issue in our case is that my flow never involved the Administrator logging in after the reboot from the install. Perhaps it's similar in your case?