WSL and VS code issue in windows 11

%3CLINGO-SUB%20id%3D%22lingo-sub-2630951%22%20slang%3D%22en-US%22%3EWSL%20and%20VS%20code%20issue%20in%20windows%2011%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2630951%22%20slang%3D%22en-US%22%3E%3CP%3Eafter%20upgrading%20to%20windows%2011%20when%20I%20run%20WSL%20I%20see%20this%20error%20%22An%20error%20occurred%20mounting%20one%20of%20your%20file%20systems%22%3C%2FP%3E%3CP%3EAlso%20when%20I%20try%20to%20open%20VS%20code%20in%20WSL%20it%20says%20VS%20code%20for%20wsl%20closed%20unexpectedly.%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20the%20terminal%20show%20this%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%5B2021-08-10%2007%3A59%3A08.861%5D%20sh%3A%201%3A%20%2Fscripts%2FwslServer.sh%3A%20not%20found%3CBR%20%2F%3E%5B2021-08-10%2007%3A59%3A08.861%5D%20VS%20Code%20Server%20for%20WSL%20closed%20unexpectedly.%3CBR%20%2F%3E%5B2021-08-10%2007%3A59%3A08.861%5D%20For%20help%20with%20startup%20problems%2C%20go%20to%3CBR%20%2F%3E%5B2021-08-10%2007%3A59%3A08.861%5D%20%3CA%20href%3D%22https%3A%2F%2Fcode.visualstudio.com%2Fdocs%2Fremote%2Ftroubleshooting%23_wsl-tips%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fcode.visualstudio.com%2Fdocs%2Fremote%2Ftroubleshooting%23_wsl-tips%3C%2FA%3E%3CBR%20%2F%3E%5B2021-08-10%2007%3A59%3A08.876%5D%20WSL%20Daemon%20exited%20with%20code%200%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20at%20windows%2011%20pro%20build%20%3A%26nbsp%3B22000.120%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

after upgrading to windows 11 when I run WSL I see this error "An error occurred mounting one of your file systems"

Also when I try to open VS code in WSL it says VS code for wsl closed unexpectedly. 

And the terminal show this error:

 

[2021-08-10 07:59:08.861] sh: 1: /scripts/wslServer.sh: not found
[2021-08-10 07:59:08.861] VS Code Server for WSL closed unexpectedly.
[2021-08-10 07:59:08.861] For help with startup problems, go to
[2021-08-10 07:59:08.861] https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
[2021-08-10 07:59:08.876] WSL Daemon exited with code 0

 

I am at windows 11 pro build : 22000.120

1 Reply

@iamvikas you need to open PowerShell with admin privileges and do wsl --update, seems like the kernel needs to be updated to mount the filesystem for wsl.