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

[Windows] Consider companion WSL2 distro on Windows for tooling #3270

Open
arixmkii opened this issue Feb 23, 2025 · 2 comments
Open

[Windows] Consider companion WSL2 distro on Windows for tooling #3270

arixmkii opened this issue Feb 23, 2025 · 2 comments

Comments

@arixmkii
Copy link
Contributor

arixmkii commented Feb 23, 2025

Description

I was evaluating ways to fix #3268 and it has become complicated. To understand the actual setting of running WSL2 kernel one needs to execute over kernel (to get info on the current networking setup), to get a gateway to host machine the most reliable way is to execute command inside WSL2 distro. The problem is that it the moment, where proxy settings has to be decided the distribution is not yet running and executing the command in it will start it (the systemd will kick in, probably PAM and may be something else). Which creates a race like situation with a startup sequence executed by limactl.

The simple fix would be to have a service companion distribution, where it is safe to execute commands w/o affecting provisioned machines. With WSL 2.4.0+ supporting distributions entirely packaged in a single tgz archive it is more approachable to build one. This could also allow bundling additional tooling, which are useful for Lima.

Good things about it:

  • full control of the distribution and it contents, it could be checked for version, etc.
  • feature complete Unix tools - prominent example is mux support in OpenSSH (not available in OpenSSH for Windows or cygwin/msys2), I used this to create a prototype for running QEMU under Windows
  • native support for arm64 Windows, cygwin/msys2 doesn't support arm64 natively. Git shell might actually support this

Downsides:

  • it is an additional part obviously
@arixmkii
Copy link
Contributor Author

I plan to add detailed description of my experiments, when I get it stabilized.

@arixmkii
Copy link
Contributor Author

Msys built OpenSSH seems to introduce incompatibility with how Lima uses it #2775 (comment)

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

No branches or pull requests

2 participants