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

Add powershell script that can troubleshoot if wsl does not even start #15

Open
ElvisDot opened this issue Dec 4, 2023 · 0 comments
Open

Comments

@ElvisDot
Copy link
Owner

ElvisDot commented Dec 4, 2023

winsock

wsl --shutdown
netsh winsock reset
netsh int ip reset all
netsh winhttp reset proxy
ipconfig /flushdns
netsh winsock reset
shutdown /r 

dns

TODO

lxss

either restart

Get-Service LxssManager | Restart-Service

or start

sc start LxssManager

or better this but it needs cmd and does not work in powershell

sc config LxssManager start=auto

or force restart

taskkill /F /FI "IMAGENAME eq wsl.exe"
taskkill /F /FI "IMAGENAME eq wslhost.exe"
taskkill /F /FI "IMAGENAME eq wslservice.exe"

Get-Service LxssManager | Start-Service

windows terminal nullbytes

also check for nullbytes in registry
https://gist.github.com/lhecker/393252fb1e95b3bc118d40ace802a505

wslservice

microsoft/WSL#11273

sc.exe config wslservice start= demand

dump logs

https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1
wsl.exe dmesg
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

1 participant