-
Notifications
You must be signed in to change notification settings - Fork 827
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
WSL2 with networkingMode=mirrored and multiple Windows users fails after first user successfully provisions networking. #11015
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
Closed similar issues:
|
/logs please |
I included logs for the second user's instance of WSL2 running (after successfully starting WSL2 in a separate user session). Unfortunately, I could not get a full repo with the same error. What I do see is a failure to create NICs for the second instance: The first user's instance has the correct networking configured (including IPv6 on eth0). |
Not directly related to this issue, but I noticed another networking issue with WSL2. Let me know if you want me to open a separate issue with logs: |
I don't fully understand the second issue you're describing, but if you file it separately that'd be awesome. |
"With a Windows 11 device with at least 2 separate users -- each user with its own WSL2 distro installation -- launch WSL2 on the first user with networkingMode=mirrored enabled in .wslconfig. This should correctly start networking, including IPv6. With the first user still logged in, switch users and start WSL2 on that separate user and separate WSl2 distro, with the same networkingMode setting in .wslconfig. The following error occurs for the 2nd user: Sorry, there's a limitation with Windows that only 1 WSL instance can be run with mirroring enabled at any one point in time - any other WSL instance will need to have NAT configured. Sorry about this :( |
Thanks for confirming I need nat mode for other instances. |
@keith-horton Are the limitations you mentioned a networking problem for the situation I tested? Looking forward to your reply, thx! |
Hi there. Can you expand on how you had 2 instances running? They were running at the same time? Were they in the context of 2 different users? If they are both configured to have mirroring enabled, networking will fail for the 2nd container. Though while networking is broken, any ports claimed by the 2nd port may still be reserved - which means they are reserved for the entire machine - the host + all containers. Does that help? |
I tested it with two distributions, Arch and Ubuntu, in the same user environment, while launching them both successfully booted to the terminal, with Ubuntu being selected as the WSL integration in the Docker desktop configuration. 192.168.1.2 is the LAN address of my windows host. The test steps are as follows:
iptables -t nat -S
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-N DOCKER
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
-A POSTROUTING -s 172.16.0.0/24 ! -o docker0 -j MASQUERADE
-A POSTROUTING -s 172.16.0.2/32 -d 172.16.0.2/32 -p tcp -m tcp --dport 80 -j MASQUERADE
-A DOCKER -i docker0 -j RETURN
-A DOCKER ! -i docker0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 172.16.0.2:80 |
its now about WSL I fixed it:
|
Windows Version
Microsoft Windows version 22631.3007
WSL Version
2.0.14.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.133.1-microsoft-standard-WSL2
Distro Version
Debian 12.4
Other Software
WSLg version 1.0.59
Repro Steps
With a Windows 11 device with at least 2 separate users -- each user with its own WSL2 distro installation -- launch WSL2 on the first user with networkingMode=mirrored enabled in .wslconfig. This should correctly start networking, including IPv6.
With the first user still logged in, switch users and start WSL2 on that separate user and separate WSl2 distro, with the same networkingMode setting in .wslconfig. The following error occurs for the 2nd user:
The operation timed out because a response was not received from the virtual machine or container. Error code: Wsl/Service/CreateInstance/CreateVm/HCS_E_CONNECTION_TIMEOUT
[process exited with code 4294967295 (0xffffffff)]
It doesn't matter which user's WSL2 I start first.
Expected Behavior
Expectation is networkingMode=mirrored works for all users simultaneously logged in.
Actual Behavior
Only the first user's WSL2 networking works with mirrored.
Diagnostic Logs
Log Name: System
Source: Microsoft-Windows-Hyper-V-VmSwitch
Date: 1/12/2024 11:52:06
Event ID: 32
Task Category: (1022)
Level: Error
Keywords: (128)
User: S-1-5-83-1-1555666032-1110446901-1052638878-2743957777
Computer: computername
Description:
Failed to connect NIC 5CB99470-1335-4230-9EFE-BD3E11798DA3--03E62423-E72E-4EB5-A235-1B2047585C98 (Friendly Name: ) to port D6C7BE28-647D-46BC-94FC-49CD493D51E9 (Friendly Name: ) on switch 30BE601B-A2AB-4EDC-9AD5-9D2600CF7CF0 (Friendly Name: ), status = Unknown NTSTATUS Error code: 0xc0010022. UniqueEvent = 100.
Event Xml:
32
0
2
1022
0
0x8000000000000080
598499
System
computername
3221291042
74
5CB99470-1335-4230-9EFE-BD3E11798DA3--03E62423-E72E-4EB5-A235-1B2047585C98
0
36
D6C7BE28-647D-46BC-94FC-49CD493D51E9
1
36
30BE601B-A2AB-4EDC-9AD5-9D2600CF7CF0
1
100
Log Name: System
Source: Microsoft-Windows-Hyper-V-VmSwitch
Date: 1/12/2024 11:52:06
Event ID: 35
Task Category: (1022)
Level: Error
Keywords: (128)
User: S-1-5-83-1-1555666032-1110446901-1052638878-2743957777
Computer: computername
Description:
Failed to connect NIC 5CB99470-1335-4230-9EFE-BD3E11798DA3--03E62423-E72E-4EB5-A235-1B2047585C98 (Friendly Name: ) to port D6C7BE28-647D-46BC-94FC-49CD493D51E9 (Friendly Name: D6C7BE28-647D-46BC-94FC-49CD493D51E9) on switch 30BE601B-A2AB-4EDC-9AD5-9D2600CF7CF0 (Friendly Name: FSE Switch). The task was vetoed by a switch extension, or the switch extension stack is corrupted. Status = Unknown NTSTATUS Error code: 0xc0010022.
Event Xml:
35
0
2
1022
0
0x8000000000000080
598498
System
computername
3221291042
74
5CB99470-1335-4230-9EFE-BD3E11798DA3--03E62423-E72E-4EB5-A235-1B2047585C98
0
36
D6C7BE28-647D-46BC-94FC-49CD493D51E9
36
D6C7BE28-647D-46BC-94FC-49CD493D51E9
36
30BE601B-A2AB-4EDC-9AD5-9D2600CF7CF0
10
FSE Switch
0
The text was updated successfully, but these errors were encountered: