Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL failing to load after restart #7739

Closed
1 of 2 tasks
DSOA-Rael opened this issue Nov 22, 2021 · 4 comments
Closed
1 of 2 tasks

WSL failing to load after restart #7739

DSOA-Rael opened this issue Nov 22, 2021 · 4 comments

Comments

@DSOA-Rael
Copy link

Version

Microsoft Windows [Version 10.0.19043.1348]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.60.1

Distro Version

Debian

Other Software

No response

Repro Steps

(I don't know if this is reproducible)

  • Running system normally
  • Experience unexepected shutdown
  • Attempt to load the WSL distro

Expected Behavior

  • I can access the Distro from the Debian app in windows
  • VScode is able to attach into the WSL.

Actual Behavior

  • Accessing Debian gives the error message:
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
For information please visit https://aka.ms/wsl2-install
Press any key to continue...
  • Access VScode gives :
[2021-11-22 15:53:37.663] Resolving wsl+Debian, resolveAttempt: 1
[2021-11-22 15:53:37.701] Starting VS Code Server inside WSL (Debian, wsl2)
[2021-11-22 15:53:37.701] Extension version: 0.58.5
[2021-11-22 15:53:37.701] Windows build: 19043. Multi distro support: available. WSL path support: enabled
[2021-11-22 15:53:37.701] No shell environment set or found for current distro.
[2021-11-22 15:53:37.792] Probing if server is already installed: C:\WINDOWS\System32\wsl.exe -d Debian -e sh -c "[ -d ~/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247 ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2021-11-22 15:53:37.836] Unable to detect if server is already installed: Error: Command failed: C:\WINDOWS\System32\wsl.exe -d Debian -e sh -c "[ -d ~/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247 ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2021-11-22 15:53:37.836] Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
[2021-11-22 15:53:37.836] For information please visit https://aka.ms/wsl2-install
[2021-11-22 15:53:37.836] 
[2021-11-22 15:53:37.836] Launching C:\WINDOWS\System32\wsl.exe -d Debian sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" ccbaa2d27e38e5afa3e5c21c1c7bef4657064247 stable .vscode-server 0  '}
[2021-11-22 15:53:37.871] Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
[2021-11-22 15:53:37.871] For information please visit https://aka.ms/wsl2-install
[2021-11-22 15:53:37.871] 
[2021-11-22 15:53:37.872] VS Code Server for WSL closed unexpectedly.
[2021-11-22 15:53:37.872] For help with startup problems, go to
[2021-11-22 15:53:37.872] https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
[2021-11-22 15:53:37.879] WSL Daemon exited with code 0

Diagnostic Logs

No response

@DSOA-Rael
Copy link
Author

To add to this; I have done a clean restart after the unexpected shutdown and the problem persists.
I did have the WSL open at the time of the unexpected shutdown, but I've not found any information on recovering WSL to a working state.

@DSOA-Rael
Copy link
Author

DSOA-Rael commented Nov 22, 2021

By this point I have additionally:

  • Installed the latest windows updates and optional firmware updates for the device
  • Ensured that virtualisation is enabled within the device BIOS
    • also confirmed in Task Manager:
      image
  • confirmed windows virtual machine platform is still present on the machine
    • image

This has meant additional restarts, but the WSL still shows the same message when attempting to access it.

@benhillis
Copy link
Member

@DSOA-Rael - we have seen reports that virtual machine platform needs to be toggled off then on again, could you see if that resolves your issue?

@DSOA-Rael
Copy link
Author

@benhillis thanks!
System now working. Small extra hiccup that might be worth mentioning for anyone else, so I'll detail my steps this morning:

  • Turn off "Virtual Machine Platform" in windows features and restart the device
  • Re-enable "Virtual Machine Platform" and restart the device

At this point, Debian WSL did load (after about 2 minutes of waiting), but VScode was unable to connect to it, complaining about a WebSocket error.

I then restarted a third time and now it all seems functional 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants