ide
ide copied to clipboard
Problem using Rancher Desktop for users with wsl 1 on Windows
While setting up rancher desktop on windows computers, cases occured in which the rancher-desktop launcher failed with an rather cryptic error output. If I remember it correctly, those cases included the error code 4294967295. Some solutions relating to this error code are given on stackexchange.
Expected behavior
No error code should be thrown out by the rancher-desktop launcher.
Affected version:
OS: Windows
Solution
The problem lies in the usage of wsl 1 instead of wsl 2, but can also relate to disabled virtualization (see comment following) Suggested steps for solving the bug:
- Recognize that wsl 1 is used
- If so, execute
wsl --update
as admin - Only start the installation of rancher desktop after these steps
Way to reproduce the error code 4294967295
For the record, I could reproduce the error code with the rancher-desktop launcher by disabling virtualization in my computers BIOS (simply switching from wsl 2 to wsl 1 from powershell wasn't enough).
The comment of the rancher-desktop launcher, at least in my case, seems quite appropriate, though. Maybe this was modified recently or there may be other ways of getting this error code, but maybe it is better to not get lost in these details. I'll try to figure out a robust way of testing for wsl 1 etc. instead.
Today I included a test for if the user has enabled version 1 of wsl. It would be nice to have some additional testing, especially as this modification is rather small. Also I could include a test for wsl 2 before executing wsl --update, but maybe thes would be an overkill, as the update command only takes a few seconds if used. There was a problem with redirecting the cmd output. Therefore I wrote the batch file and the version number into temp-files, but I'm open to better suggestions that work.
Oh, Microsoft heard our plea
$ wsl -v -l
WSL-Version: 2.0.14.0
Kernelversion: 5.15.133.1-1
WSLg-Version: 1.0.59
MSRDC-Version: 1.2.4677
Direct3D-Version: 1.611.1-81528511
DXCore-Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows-Version: 10.0.19045.4412
Seems that some windows or WSL update brought this new behavior. Not sure if this is all still relevant. Maybe computers with WSL1 are dying out meanwhile and can only be found in museums. So maybe we can also close this issue as not planned.
For the record this was the actual error a colleague of mine was getting:
It was not the one with the BIOS. In his case, he still had WSL1 installed for whatever reason.
Solution was to run wsl --upgrade
in a admin CMD shell and after that reinstall rancher-desktop.