WSL2 not working out of the box on Windows 11
Hello,
I couldn't find a similar thread so I'm creating a new one.
We currently use WSL2 to run some algorithms in our desktop application on Windows 10. With Windows 11 wsl2 does not work out of the box and wsl2 cannot start because it is missing some "kernel files" that are required. This means that clients upgrading to Windows 11 can't use at all some functionalities of the software.
The message we get is
The WSL 2 kernel file is not found. To update or restore the kernel please run 'wsl.exe --update'
The fix in itself is quite simple (e.g. run wsl.exe --update
as admin), but we are struggling to detect this broken state reliably. At the moment the best we could do is parsing the output of wsl.exe --status
which is very hacky and can change according to language and maybe other versions installed.
Is there a way to be able to know reliably if wsl is in a healthy state? Do you have any suggestions?
Thanks for your help.
Antonio