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

[Dev Containers]the local WSL starts automatically when connecting to a container on a REMOTE host #9905

Closed
NirvanaCh opened this issue May 21, 2024 · 3 comments
Assignees
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster

Comments

@NirvanaCh
Copy link

I have very little memory on this host, so I'm working on a remote host. I often find that WSL starts up automatically.

Until I found this in the Dev Containers logs

...
[4358 ms] Start: Run: docker inspect --type container /beautiful_jepsen
[4516 ms] Start: Run: wsl -l -v
[4978 ms] Start: Run: wsl -d Ubuntu -e /bin/sh -c echo ~
[17414 ms] Start: Run: wsl -d Ubuntu -e /bin/sh -c cd '/home/user' && /bin/sh
[17423 ms] Start: Run in host: id -un
[17797 ms] user
...

I'm connecting to a container on a remote host, why do I need to turn on the local WSL?
The logs of the port forwarding made me think it had to be forwarded to WSL.

... 
[4512098 ms] Port forwarding 50684 > 46051 > 46051 stderr: Connection established
[4512117 ms] Port forwarding 50686 > 46051 > 46051 stderr: Connection established
[4512167 ms] Port forwarding 50688 > 46051 > 46051 stderr: Connection established
[4512201 ms] Port forwarding 50690 > 46051 > 46051 stderr: Connection established
...

After 'wsl --shutdown'

[2191307 ms] Host server terminated (code: 1, signal: null).

But the remote connection and port forwarding were not interrupted.

So turning on the local WSL doesn't do anything.

@VSCodeTriageBot VSCodeTriageBot added the wsl Issue in vscode-remote WSL label May 21, 2024
@aeschli aeschli assigned chrmarti and unassigned aeschli May 21, 2024
@aeschli aeschli added containers Issue in vscode-remote containers and removed wsl Issue in vscode-remote WSL labels May 21, 2024
@chrmarti
Copy link
Contributor

Try disabling WSL services in the user settings:
Image
Does that help?

@chrmarti chrmarti added the info-needed Issue requires more information from poster label May 28, 2024
@NirvanaCh
Copy link
Author

NirvanaCh commented May 28, 2024

Try disabling WSL services in the user settings: Image Does that help?

Yes, thank you so much, the issue is resolved. I'm sorry for taking up your time.

With this, I can use WSL services within the container, like ssh-agent, even if it's a remote container, right?

I‘d seen #9897 . I think, just for me, this should not be enabled by default. Perhaps a notification or prompt would be helpful?

@chrmarti
Copy link
Contributor

With this, I can use WSL services within the container, like ssh-agent, even if it's a remote container, right?

Correct. You still get the ssh-agent forwarded from Windows (if it is running) when you disable this setting.

I‘d seen #9897 . I think, just for me, this should not be enabled by default. Perhaps a notification or prompt would be helpful?

We are trying to avoid adding more noise to the UI. I assume most users are fine with the default WSL distro starting and this user setting can be used to avoid it when needed. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants