-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Support for WSL2 v 2.0 in Mirrored mode #714
Comments
Thanks for the report! @benmcmorran |
@dorssel I can't find a better way to tell in which networking mode WSL2 is, other than checking the version (should be 2.0.0 or newer) and the presence in the .wslconfig file of this:
|
I'm not currently working on WSL, but I can try to loop in a Microsoft engineer that is. |
Sounds like reading |
@dorssel we are looking into a robust way to detect this and will share it as soon as it's available! :) |
@dorssel we added a binary called https://github.com/microsoft/WSL/releases/tag/2.0.4 |
It seems to work! |
Yes, I found the same. However ... In fact, I believe the whole WSL enumeration code needs a refactor. It is rather old, some stuff is no longer required. It was originally designed to determine the 'per-distro' IP address, which actually never worked, as the IP address is the same for all distros anyway, irrespective of the networking mode. In other words: the design doesn't really fit the purpose. Rewrite is incoming, but not very soon... |
@dorssel Is the following helpful:
|
Not really, sorry. This is exactly what I was referring to. This is running a remote command, on the default distro, which may not even be running (or may not even be WSL 2). |
@dorssel With wsl shut down, the command still works, albeit it takes ten seconds (needs to start wsl, I guess):
The command indeed runs on the default distro, but .wslconfig is global, applies to all distros. |
4.0.0 has been released, which supports mirrored networking mode. |
The new version of WSL2 (v2.0) offers Mirrored networking mode (https://devblogs.microsoft.com/commandline/windows-subsystem-for-linux-september-2023-update). In this mode
usbipd
can't attach:A workaround is this (in WSL2):
but it is not very convenient...
The text was updated successfully, but these errors were encountered: