WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Cannot enable Mirrored network on WSL

Open ecomter opened this issue 1 year ago • 21 comments

Windows Version

Microsoft Windows [Version 10.0.26052.1000]

WSL Version

2.1.1.0

Are you using WSL 1 or WSL 2?

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

5.15.146.1-microsoft-standard-WSL2

Distro Version

Ubuntu 18.04

Other Software

No response

Repro Steps

I set the network type to mirrored in the .wslconfig file. networkingMode=mirrored and then restart WSL

Expected Behavior

Everything's getting good. It should work.

Actual Behavior

When I start wsl it reports an error:

无法初始化Mirrored网络。若要切换回NAT网络请从 C:\Users\ecomter\.wslconfig中删除“experimental.networkingMode”
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/0x803b0015

Diagnostic Logs

WslNetworkingLogs-2024-02-14_17-09-15.zip

ecomter avatar Feb 14 '24 09:02 ecomter

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:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar Feb 14 '24 09:02 github-actions[bot]

Hi. Can you please collect networking logs by following the instructions below? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

chanpreetdhanjal avatar Feb 14 '24 23:02 chanpreetdhanjal

I have finished it in the title “Diagnostic Logs” of the first answer. WslNetworkingLogs-2024-02-14_17-09-15.zip

ecomter avatar Feb 15 '24 00:02 ecomter

Is there a available solution yet, please? I found in the Microsoft documentation that it might mean HCN_E_REQUEST_UNSUPPORTED error which is "The specified request is unsupported". I am hosting my virtual machine in azure, hope this helps!

ecomter avatar Feb 17 '24 09:02 ecomter

Hi there. can you clarify what version of Windows is running in your virtual machine? Is this a server SKU? is it a headless server SKU? I'm reading code where it looks like it's blocking it for some reason.

keith-horton avatar Feb 20 '24 21:02 keith-horton

It's Windows Server 2025 Datacenter Azure Edition Build 26052 running on Microsoft Azure, I connect to it by RDP. So I think it is a Headless server SKU

ecomter avatar Feb 21 '24 09:02 ecomter

Yeah, sorry. I found code in another component that's blocking Mirrored mode from running on Server SKUs :(

I'm going to try and fix this for the next release. I will have to pitch this to folks who work on servicing for existing releases.

keith-horton avatar Mar 07 '24 02:03 keith-horton

Yeah, sorry. I found code in another component that's blocking Mirrored mode from running on Server SKUs :(

I'm going to try and fix this for the next release. I will have to pitch this to folks who work on servicing for existing releases.

Hi @keith-horton , just a friendly ping to see if you were able to get Mirrored mode working with Windows Server (2022 in particular) and if there's any eta on the release for the next WSL pre-release build. Thanks!

L2 avatar May 15 '24 16:05 L2

It's Windows Server 2025 Datacenter Azure Edition Build 26052 running on Microsoft Azure, I connect to it by RDP. So I think it is a Headless server SKU

I'm also getting this on Windows Datacenter Server 2025 preview.

joshmouch avatar May 26 '24 22:05 joshmouch

I have settled with port forwarding for now as detailed in https://github.com/microsoft/WSL/issues/4150

Hopefully this constraint is removed for Windows Server SKUs soon.

captainhook avatar May 31 '24 10:05 captainhook

Still exists on Windows Server VNext Preview (Canary) - Build 26280

KinComet avatar Sep 23 '24 16:09 KinComet

Still getting this on Windows Server 2025 Version 24H2 Build 26100.2033. CreateInstance/CreateVm/ConfigureNetworking/0x803b0015, falling back to networkingMode=none.

ElvinStarry avatar Oct 30 '24 15:10 ElvinStarry

Still getting this on Windows Server 2025 Version 24H2 Build 26100.2033. CreateInstance/CreateVm/ConfigureNetworking/0x803b0015, falling back to networkingMode=none.

Same. I'm hoping to run an up-to-date squid version under WSL, but in NAT mode, all requests logged are comming from the default-gateway of the WSL subnet instead of the true client, so there is no distinction between requests. (it's not only DNAT-ting on the Windows host, but also SNAT-ting) really was hoping that Mirrored Network mode would solve this for me.

Vossiewos avatar Oct 30 '24 16:10 Vossiewos

Have same issue with new install of Server 2025 and WSL 2.4.10

arixmkii avatar Feb 09 '25 18:02 arixmkii

Have same issue with new install of Server 2025 26100.3194 and WSL2 2.4.11.0

firezym avatar Feb 19 '25 08:02 firezym

Have same issue after updated to win11 24H2(26100.3194)

MJRT avatar Feb 19 '25 16:02 MJRT

Have same issue after updated to win11 24H2(26100.3194)

Changing the networking mode to VirtioProxy and restarting Windows works for me!

MJRT avatar Feb 20 '25 17:02 MJRT

mine even have more errors

wsl: 指定的请求不受支持。 Error code: CreateInstance/CreateVm/ConfigureNetworking/0x803b0015 wsl: Failed to configure network (networkingMode Mirrored), falling back to networkingMode None. wsl: A localhost proxy configuration was detected but not mirrored into WSL. WSL in NAT mode does not support localhost proxies.

fyq163 avatar Mar 16 '25 14:03 fyq163

Same here. Server 2025 datacenter 26100.3476 and wsl 2.4.12

kidfruit avatar Mar 22 '25 16:03 kidfruit

Have same issue with new install of Server 2025 26110.4061 and WSL 2.4.13.0

acdzh avatar May 21 '25 05:05 acdzh

Have same issue with new install of Server 2025 26110.4349 and WSL 2.5.7.0

windmill419 avatar Jun 14 '25 15:06 windmill419

Have same issue with new install of Server 2025 26110.4652 and WSL 2.5.9.0 virtioproxy is working well

marclevine avatar Jul 24 '25 08:07 marclevine

Have same issue with new install of Server 2025 26100.4946 and WSL 2.5.10.0

yanshiqwq avatar Aug 27 '25 15:08 yanshiqwq

Is there any update on this being fixed? It looks like it's been an issue for over a year. I'm still having it on Windows Server 2025.

Quadrotix avatar Sep 10 '25 15:09 Quadrotix

Have same issue with new install of Server 2025 26100.4946 and WSL 2.5.10.0

Have same issue with new install of Server 2025 26100.6584 and WSL 2.6.1.0

yanshiqwq avatar Sep 14 '25 04:09 yanshiqwq

Its not supported and depreciated.

mccaya avatar Sep 16 '25 16:09 mccaya

Have same issue with new install of Server 2025 26100.6584 and WSL 2.6.1.0

intelljames avatar Sep 25 '25 02:09 intelljames