wsltty icon indicating copy to clipboard operation
wsltty copied to clipboard

Failed to start WSL2 with assertation error at "GetVmId.cpp"

Open SubhashBose opened this issue 2 years ago • 4 comments

I am on Windows 11. When trying to start a WSL2 distribution I get the following error for a split second and closes. So, I captured the error by running wslbridge2.exe

assertion "hRes == 0" failed: file "GetVmId.cpp", line 194, function: HRESULT GetVmId(GUID*, GUID*)
      0 [main] wslbridge2 1320 cygwin_exception::open_stackdumpfile: Dumping stack trace to wslbridge2.exe.stackdump

The important part is, this error ONLY occurs when the WSL2 virtual machine is not already running, i.e, after a fresh reboot of windows or wsl2 VM was shutdown by wsl --shutdown. Once WSL is already started by regular method (say from start menu) and then closed., the linux terminal closes but WSL2 VM keeps running in the background. So, now when I start wsltty/mintty/wslbridge2.exe it runs fine..

My temporary workaround is to run wsltty from a .bat file but first to invoke wsl using the regular way. This works but is not optimal because it increased the startup time unnecessarily.

wslg ~ exit

start "" "%~dp0bin\mintty.exe" -i "%~dp0wsl.ico" --WSL= --configdir="%~dp0Appdata" -~   %*

I am using the latest release of wsltty (3.6.0).

SubhashBose avatar Apr 10 '22 22:04 SubhashBose

Are you using Windows Store version of WSL? The preview one.

Biswa96 avatar Apr 11 '22 02:04 Biswa96

Thank you for your reply. Going to the start menu I can see it is mentioned "Windows Subsystem for Linux Preview", so I suppose this is the preview one you are asking for. However, I didn't install it from Windows Store. I simply ran the command wsl --install in a fresh installation of Win11.

SubhashBose avatar Apr 11 '22 05:04 SubhashBose

This seems to be duplicate of https://github.com/mintty/wsltty/issues/302. My apology for being late. Just wait a day or so 🙇

Biswa96 avatar Apr 11 '22 06:04 Biswa96

Ok. Thanks.

SubhashBose avatar Apr 11 '22 06:04 SubhashBose