WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Can WSL Containers (WSLC) run on Windows Server 2022?

Open hou-yufeng opened this issue 4 months ago • 5 comments

WSL Containers (WSLC) is an excellent feature. Can the current test version 2.9.3 run on Windows Server 2022?

hou-yufeng avatar Jul 10 '26 01:07 hou-yufeng

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 script will output the path of the log file once done.

If this is a networking issue, please use .\collect-wsl-logs.ps1 -LogProfile networking instead, following the instructions in Collect WSL logs for networking issues

Once completed please upload the output files to this GitHub issue.

See Collect WSL logs (recommended method).

If you choose to email these logs instead of attaching them to the bug, please send them to [email protected] with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.

github-actions[bot] avatar Jul 10 '26 01:07 github-actions[bot]

/question

ylwl1997 avatar Jul 31 '26 09:07 ylwl1997

TL;DR: Windows Server 2025 works with WSL containers; Server 2022 does not. Here's what we know from hands-on testing as of wslc 2.9.4.0 (mid-2026).

Server 2025 — works and verified. WSL 2.9.x runs on Windows Server 2025, and wslc ships with it. We've been running wslc 2.9.4.0 on GitHub Actions windows-2025 runners (Windows Server 2025 with hardware nested virtualisation) and it pulls and runs images reliably — 23 mainstream images in our last matrix run, with per-image exit codes. The workflow is: wsl --update --pre-release on the runner, then call C:\Program Files\WSL\wslc.exe by absolute path (that directory is not on PATH by default).

Server 2022 — not supported. Windows Server 2022 is not in the supported platform list for WSL 2.9.x. Two things block it:

  1. WSL 2 itself has limited support on Server 2022 — the supported server target moved to 2025.
  2. wslc boots a per-session Hyper-V utility VM that relies on a newer virtualisation path Server 2022 does not expose.

So there is no wslc.exe-on-Server-2022 workaround to enable — the utility VM host path just isn't there.

Windows 10 is also out of scope; the utility VM path ships in Windows 11 22H2+ and Server 2025 only.

If your constraint is "must stay on Server 2022", you'd have to wait for Microsoft to either backport the container host or officially support 2022 — neither appears scheduled. If you can move to Server 2025, wslc works there today.

(For reference: I keep a verified write-up of exactly what runs on Server 2025, including the runner setup and the 23-image matrix, at https://wslcontainers.com/guides/windows-server/ — the matrix itself is at https://wslcontainers.com/images/. Happy to update this if Microsoft lands Server 2022 support.)

ylwl1997 avatar Jul 31 '26 09:07 ylwl1997

Empirical data point for this question, from two Windows Server 2022 machines (10.0.20348) running WSL 2.9.4.0 installed from the same MSI:

  • Bare metal (Xeon Gold 5118, Hyper-V host)
  • A Hyper-V guest on that host with nested virtualization enabled (VM config version 10.0)

wsl --version works on both, and wslc system session list responds instantly. But every session-backed command — including wslc run --rm hello-world with zero images and zero containers — fails after ~30s with:

This operation returned because the timeout period expired.
Error code: 0x800705b4

An ETW trace shows the session VM booting and containerd 2.2.4 starting normally, then Timed out waiting for dockerd to start, so the failure is at session creation rather than anything image- or container-specific. Nothing is logged as an Error or Warning in System, Application or any Hyper-V channel.

Details and full trace findings in #41421. Since it reproduces on bare metal as well as nested, it does not appear to be a virtualization issue — the common factor is Windows Server 2022.

So: not working here on 2.9.4, at least. An official statement either way would be useful, since the docs don't mention Windows Server.

moocower avatar Aug 23 '26 13:08 moocower

WSLC is indeed supported on Windows Server 2022. The latest build should resolve the issue reported by @moocower, but feel free to open a new one if that's not the case

OneBlue avatar Oct 09 '26 21:10 OneBlue