[Windows] Consider companion WSL2 distro on Windows for tooling
- Dominant language
- Go
- Stars
- 21.9k
- Forks
- 957
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 53
Description
### 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
Contributor guide
Research direction
Start by reading #3268 and the Windows tooling path, then review WSL 2.4.0+ support for distributions packaged as a single tgz archive. Done would require a concrete, agreed approach for whether and how a companion distro should be built and integrated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100