Repository navigation
WSL2 fails to start with networkingMode=bridged #9227
VersionMicrosoft Windows [Version 10.0.19045.2311] WSL Version
Kernel VersionLinux version 5.15.74.2-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Wed Nov 2 19:50:29 UTC 2022 Distro VersionUbuntu 20.04.3 LTS Other SoftwareNo response Repro Stepscreate a virtual switch according to : [(https://github.com/luxzg/WSL2-fixes/blob/master/networkingMode%3Dbridged.md#install-wsl-2-preview)] fresh install of wsl: add the lines: to try runnig wsl Expected Behaviorwsl should start Actual Behaviorwsl command terminates with: removing the Diagnostic LogsNo response |
Replies: 15 comments 26 replies
|
Kim Lilliestierna (@Kilill) WSL network bridging, as per mentioned guide, works in Windows 11 only. Looks like you're using Windows 10. |
|
Yeah noticed that, but afaik that guide was also done for the prerelease of WSL 2 before it transitioned into V1.0 and supposedly supported on W10... |
|
I have it working on Windows 11 but on Windows 10 it keeps throwing errors: WSL version used for testing: |
|
got same issue. Any workaround plz? |
|
got same issue. Any workaround plz? |
|
got same issue. Any workaround plz? |
|
I think they just want us to use the w11 |
|
Change to the following format, then it works: |
|
It doesn't work on Windows 10. After creating an external switch named
|
|
I do not expect WSL2 to ever work correctly on Win10 since MS wants you to migrate to WIN11 |
|
This works for me. If it doesn't work for you, then figure it out yourselves: [For Win 10] Edit Hyper-V -> WSL (like what tylerjin mentioned) switch to use external On WSL machine: [Match] /etc/wsl.conf /etc/resolv.conf systemctl enable systemd-networkd |
|
Hi!
which sets the WSL virtual switch back to Internal after WSL will be shut down later
now running shortcut (not the ubuntu.bat!) will launch WSL, WSL will apply settings from the /etc/wsl.conf = for me gets ip from the router connected to the Ethernet adapter (in bullet 3) and the nameserwer is 8.8.8.8 (in bullet 4). Could be checked with After WSL shuts down (sudo shutdown now) the script in bullet 1 continues with setting back WSL virtual adapter to Internal (line powershell -Command "Set-VMSwitch WSL -SwitchType Internal") that prevents the system from loosing net configuration after rebooting the host PC. that's all for me. |
|
or without this scripting
|
|
Sad news from just released WSL v2.4.5 changelog:
Bridged mode works very well as it is now in WSL-Version: 2.4.5.0 |
|
The exact message is that |
Fortunately the latest pre-release reads
2.5.6