shayne / go-wsl2-host

Automatically update your Windows hosts file with the WSL2 VM IP address
1.66k stars 143 forks source link

Doesn't work. Just doesn't do anything. #33

Open boiimakillu opened 4 years ago

boiimakillu commented 4 years ago

I installed the service. I start my wsl distro (Stock Debian UWP). I have it set to WSL 2, but the service just does nothing. No changes to host file. When I start the exe with the debug argument, all it says is "starting wsl2host service". Nothing else. Can someone please help? I'm really at a loss.

jae-jae commented 4 years ago

me too

tuhlmann commented 4 years ago

@boiimakillu Can you check the Windows Services if the WSL2 Host service is running (WIN-R, type services.msc)?

I had to change my password (local password and connected Windows account) and then enable automatic start.

When running it should change the Windows hosts file in C:\WINDOWS\system32\drivers\etc\hosts

ktmn commented 4 years ago

Check Event Viewer -> Windows Logs -> System for messages from Service Control Manager.

First my username was wrong, it had a message about it, then it couldn't log on as a service, and also had a message about that.

Fretice commented 4 years ago

i had solved this problem in my computer, i'm not sure it is same helpful for you too ,

open Event Viewer -> Windows Logs -> Application

if error message of wsl2host is "failed to get infos: wsl list all failed: wsl -l -v failed xxxxxx" then remove the wsl2host service and put the exe file into disk C anywhere, reinstall the service and refresh the logs

if error message of wsl2host is "Access Denied" then remove selected status about Read-Only attribute of the folder "C:\WINDOWS\system32\drivers\etc"

ljt92 commented 4 years ago

i had solved this problem in my computer, i'm not sure it is same helpful for you too ,

open Event Viewer -> Windows Logs -> Application

if error message of wsl2host is "failed to get infos: wsl list all failed: wsl -l -v failed xxxxxx" then remove the wsl2host service and put the exe file into disk C anywhere, reinstall the service and refresh the logs

if error message of wsl2host is "Access Denied" then remove selected status about Read-Only attribute of the folder "C:\WINDOWS\system32\drivers\etc"

thanks,it works for me : )

artempas commented 1 year ago

Have same issue. Moving to C:\ didn't help