WSL2 not working out of the box on Windows 11

Anto2378 1 Reputation point
2021-12-09T15:07:41.527+00:00

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

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.