microsoft / vscode-dev-containers

NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!
https://aka.ms/vscode-remote
MIT License
4.7k stars 1.41k forks source link

Default WSL distro started for no apparent reason #1725

Closed voltamund closed 1 year ago

voltamund commented 1 year ago

Version: 1.76.0 (system setup) Commit: 92da9481c0904c6adfe372c12da3b7748d74bdcb Date: 2023-03-01T10:22:44.506Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Windows_NT x64 10.0.19045 Sandboxed: No

For some reason opening a devcontainer in vs code starts my default WSL distro.

  1. Open new VS Code Window on Windows Host -> WSL not started
  2. Connect to Linux VM via ssh (not wsl distro) -> WSL not started
  3. On Linux VM open folder or workspace in devcontainer -> default WSL distro on Windows host is started

It is really not clear which part of vs code starts the WSL distro and why this is done at all. The devcontainer runs in docker or podman on the Linux VM. VS Code connects to it through ssh. WSL should not be involved at all. For now at least I set a WSL1 distro as my default to make it cheaper.

I could reproduce this on two different machines with similar setup. It also happens when opening the most recent folder / workspace in the devcontainer directly.

voltamund commented 1 year ago

I think https://github.com/microsoft/vscode-remote-release is more appropriate for this issue and have opened an issue there,