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
The specified WSL distribution cannot be reached via the WSL virtual switch #136
Comments
@SJ123SJ
And from within WSL:
|
Windows
WSL
|
@dorssel This issue was closed, but v1.3 did not resolve the problem on my system. Are there some new instructions to make t his work? C:\WINDOWS\system32>usbipd --version C:\WINDOWS\system32>usbipd wsl attach --busid 1-1 |
@SJ123SJ
It looks like the error "The specified WSL distribution cannot be reached via the WSL virtual switch" is correct. Maybe there is a special route to the instance. Can you run the same commands again, and additionally:
Can you ping the instance at its address from the host (note that the addresses may have changed by now)? |
C:\WINDOWS\system32>route print
PINGS
The instance IP is still at 172.17.0.3, but it can't be pinged. |
Perhaps Docker is blocking the WSL instance from being pinged?? |
Maybe... is that docker on Windows (host side) or do you run docker within WSL? But in any case, it is really weird that the host WSL switch and the WSL IP-address are not on the same subnet in the first place. As far as I know, you are the only person experiencing this. Have you rebooted since the original issue? I think the WSL switch gets re-initialized every time you start the first WSL instance after reboot (not sure, though). |
Docker is on Windows (host side). Update: I read here that Docker Desktop for Windows can’t route traffic to Linux containers. However, you can ping the Windows containers. |
@SJ123SJ If you install a linux distro with WSL and enable integration with the distro in Docker Desktop you'll be able to connect. You'll also want to run through the WSL Support Wiki to set up your distro. |
Version 2.0.0 has been released which has better error reporting for network/firewall issues. Closing. |
NEW EDIT: I've partially solved my issue. When I didn't start docker desktop, I have another error message:
So I add the
But when I run a docker container with flag old edit: |
@dorssel |
It used to work, but now I have the same problem.
|
The logic was made by Microsoft. It looks for a (single) switch with WSL in the name. You have two, the first having address 192.168.144.1, which is indeed unreachable from Ubuntu (it uses the other one). How did you get two WSL switches? Is that something docker related? I think I can just revise the logic to find any switch that has a matching address... |
I don't know where wslcore came from. Maybe it's Android Subsystem or wslg related. I haven't done much with docker. |
Related (and now confirmed it is from the Android Subsystem), see: #588 (comment) |
I'm running Windows 10 20H2, Docker Desktop 4.3.0 (71786), usbipd-win_1.2.0, WSL2 5.10.60.1
C:\WINDOWS\system32>usbipd list
Present:
BUSID DEVICE STATE
1-1 USB Serial Converter Not shared
1-2 USB Input Device Not shared
1-10 Dell ControlVault w/ Fingerprint Touch Sensor, Microsoft ... Not shared
1-14 Intel(R) Wireless Bluetooth(R) Not shared
3-4 Realtek USB GbE Family Controller Not shared
5-5 USB Input Device Not shared
6-4 Realtek USB Audio Not shared
6-5 USB Input Device Not shared
C:\WINDOWS\system32>usbipd wsl attach --busid 1-1
usbipd: error: The specified WSL distribution cannot be reached via the WSL virtual switch; try restarting the WSL distribution.
Restarting WSL2 doesn't remedy the error.
In WSL2
root@2365b39e6896:/# uname -a
Linux 2365b39e6896 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
root@2365b39e6896:/# lsusb
Bus 002 Device 001: ID 1d6b:0003
Bus 001 Device 001: ID 1d6b:0002
Any clues regarding this virtual switch would be helpful.
The text was updated successfully, but these errors were encountered: