WSL2 fails to start with mirrored networking mode with code 0x8007054f
Windows Version
Microsoft Windows [Version 10.0.26300.9032]
WSL Version
2.9.4.0
Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
Kernel Version
6.18.35.2-1
Distro Version
Ubuntu 24.04
Other Software
Since it's a networking issue, here is the list of network-related softwares I installed
Tailscale v1.98.10 v2RayN v7.24.3 running under system proxy mode, not tun mode
Repro Steps
Set networking mode to mirrored and start wsl with any command (bash/wsl/icon in start menu)
Expected Behavior
Start normally with mirrored networking
Actual Behavior
wsl: An internal error occurred. Error code: CreateInstance/CreateVm/ConfigureNetworking/0x8007054f 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.
Diagnostic Logs
WslLogs-2026-08-02_12-13-08.tar.gz
I've tried to reset hns service and winsock, but none of them worked:
wsl --shutdown
net stop hns
net start hns
netsh winsock reset
netsh int ip reset
I've also tried to start WSL with both Tailscale and v2RayN turned off, but the problem persists.
Diagnostic information
.wslconfig found
Detected appx version: 2.9.4.0
Hi @Paulkm2006 . The log shows a huge host tcp dynamic port range 1024 - 65534. WSL failed to reserve the 4096 ephemeral port range since there are not enough ports left. You could verify this with
netsh interface ipv4 show dynamicportrange protocol=tcp
netsh interface ipv6 show dynamicportrange protocol=tcp
If that's the case, please consider reduce that range to the default value.
netsh interface ipv4 set dynamicportrange protocol=tcp startport=49152 numberofports=16384
netsh interface ipv6 set dynamicportrange protocol=tcp startport=49152 numberofports=16384
Then restart the computer and check if the change persisted.
Hi @Paulkm2006 . The log shows a huge host tcp dynamic port range 1024 - 65534. WSL failed to reserve the 4096 ephemeral port range since there are not enough ports left. You could verify this with
netsh interface ipv4 show dynamicportrange protocol=tcp netsh interface ipv6 show dynamicportrange protocol=tcpIf that's the case, please consider reduce that range to the default value.
netsh interface ipv4 set dynamicportrange protocol=tcp startport=49152 numberofports=16384 netsh interface ipv6 set dynamicportrange protocol=tcp startport=49152 numberofports=16384Then restart the computer and check if the change persisted.
Hi @chemwolf6922
Thanks for your help! Reducing the port range indeed helped with my issue.
Hi @Paulkm2006 . There is another report of this exact issue. There might be a common cause for this host port range change. Have you installed any software lately that may have caused this change?