After installing KB5036893, WSL now logs an event regarding "Invalid networking mode 'mirrored' in C:\Users\<username>\.wslconfig"
ZenInTexas opened this issue · 6 comments
Windows Version
Microsoft Windows [Version 10.0.22631.3447]
WSL Version
2.0.0.0
Are you using WSL 1 or WSL 2?
- WSL 2
- WSL 1
Kernel Version
5.15.123.1-microsoft-standard-WSL2
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
.wslconfig
#Entry networkingMode require Windows 11 version 22H2(or higher)
networkingMode=mirrored
Expected Behavior
.wslconfig, networkingMode=mirrored should run
Actual Behavior
After installation of KB, WSL now emits an event regarding mirrored
Diagnostic Logs
Log Name: Application
Source: WSL
Date: 5/7/2024 7:59:07 AM
Event ID: 0
Task Category: None
Level: Warning
Keywords: Classic
User: N/A
Computer: CPU2
Description:
The description for Event ID 0 from source WSL cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Invalid networking mode 'mirrored' in C:\Users<username>.wslconfig
The message resource is present but the message was not found in the message table
Event Xml:
0
0
3
0
0
0x80000000000000
50723
Application
CPU2
Invalid networking mode 'mirrored' in C:\Users<username>.wslconfig
Logs are required for review from WSL team
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs
Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1
The scipt will output the path of the log file once done.
Once completed please upload the output files to this Github issue.
Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.
View similar issues
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!
Open similar issues:
- Networking mode does not work in mirrored mode (#11540), similarity score: 0.77
- networkMode=mirrored gives an error (#11359), similarity score: 0.75
- Cannot enable Mirrored network on WSL (#11154), similarity score: 0.74
Closed similar issues:
- Mirrored mode networking unavailable in Windows 11 (#11414), similarity score: 0.77
- wsl: Mirrored networking mode is not supported, falling back to NAT networking (#11283), similarity score: 0.74
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Logs are required for review from WSL team
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs
Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1
The scipt will output the path of the log file once done.
Once completed please upload the output files to this Github issue.
Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.
View similar issues
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!
Open similar issues:
- Networking mode does not work in mirrored mode (#11540), similarity score: 0.77
- networkMode=mirrored gives an error (#11359), similarity score: 0.75
- Cannot enable Mirrored network on WSL (#11154), similarity score: 0.75
Closed similar issues:
- Mirrored mode networking unavailable in Windows 11 (#11414), similarity score: 0.77
- wsl: Mirrored networking mode is not supported, falling back to NAT networking (#11283), similarity score: 0.75
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
@ZenInTexas if you're using wsl-2.0.0
still, the setting must be added under [experimental]
tag:
[experimental]
networkingMode=mirrored
The feature was promoted in a later wsl release.
@zcobol, thanks I moved it to under [experimental] tag, and it no longer creates an Windows Event under WSL for "Invalid networking mode 'mirrored'"
I am going to try upgrading, with "wsl --update --web-download", which it looks like will get me to wsl 2.1.5
Closed
In some cases it happens because /etc/resolv.conf overridden. To fix that execute following commands
sudo rm /etc/resolv.conf
sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf'
sudo bash -c 'echo "[network]" > /etc/wsl.conf'
sudo bash -c 'echo "generateResolvConf = false" >> /etc/wsl.conf'
sudo chattr +i /etc/resolv.conf