WSL: WSL 2 broken on Windows Server Preview (since change to fe_release branch)
Environment
WSL 2 on Windows Server Preview Build 20262 (Windows Server 2019 Datacenter)
but is applicable to all (server?) preview builds ever since flighting changed to the "fe_release[_server]" branch, so 20246+
Steps to reproduce
Run any WSL 2 related command like for example wsl --set-default-version 2 or wsl --set-version Ubuntu 2 or try to run Docker Desktop with the WSL 2 backend.
Expected behavior
Command executes successfully.
Actual behavior
Commands just result in the same output as wsl --help shows.
Noting that it does NOT output Invalid command line option: <options> in first line, but in fact only the usage info as in wsl --help.
Docker Desktop with WSL 2 backend startup also fails showing the same output (wsl --help) as error.
Additional links
Related discussion: https://techcommunity.microsoft.com/t5/windows-server-insiders/wsl-2-not-working-after-installing-20262/m-p/1928823
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 12
- Comments: 69 (7 by maintainers)
Hi folks, we’ve added support for WSL 2 distros on Windows Server 2022! This is available right now by installing KB5014021. Currently this update is only available for seekers, and next month it will be pushed by default.
Going forwards, WSL will be supported both on Windows server and Windows desktop SKUs. Thank you all for the feedback, we appreciate your energy and passion for WSL!
I’ve edited this comment to give more accurate up to date information. Below you can find the original comment.
Hi all, thank you for your patience on this. Support for WSL 2 distros in the Windows Subsystem for Linux (WSL) is not included in Windows Server versions. WSL was created to support inner development loop scenarios. The Windows Desktop SKUs (where WSL 2 is supported) are recommended SKUs for these scenarios. For those who would like to use Linux in production scenarios in a server environment we recommend using server products such as Hyper-V VMs, and AKS on Azure Stack HCI. As always, we welcome any further Windows Server feedback through our Feedback Hub.
@craigloewen-msft I disagree vehemently with this decision. It was working perfectly in prior releases. Telling customers that want to use WSL2 on a Server to use Desktop SKUs just strikes me as an incredibly tone deaf move by Microsoft. Why even have WSL1 on Windows Server at that point?
Hi folks, we’ve added support for WSL 2 distros on Windows Server 2022! This is available right now by installing KB5014021. Currently this update is only available for seekers, and next month it will be pushed by default.
Going forwards, WSL will be supported both on Windows server and Windows desktop SKUs. Thank you all for the feedback, we appreciate your energy and passion for WSL!
Hi folks, we’ve added support for WSL 2 distros on Windows Server 2022! This is available right now by installing KB5014021. Currently this update is only available for seekers, and next month it will be pushed by default.
Going forwards, WSL will be supported both on Windows server and Windows desktop SKUs. Thank you all for the feedback, we appreciate your energy and passion for WSL!
I’ve edited this comment to give more accurate up to date information. Below you can find the original comment.
Hi folks! We’ve listened to feedback in this area and I’d like to clarify that WSL 2 distros are now supported on Windows server version 20H2 (And runs on Windows server version 2004 though that is now out of support). This means that you can run WSL 2 distros on those Server versions. Currently WSL 2 distro support is not on Windows Server 2022, but we are investigating this. If you’d like to use WSL 2 distros on Windows Server I would recommend you use Windows server version 20H2 for the time being. Thank you all for giving us your feedback here, I look forwards to hearing more as we give more updates when they’re available.
I have been waiting years to be able to run Docker using WSL 2 on Windows Server with Desktop Experience, which suits my needs perfectly.
The decision to remove the support for WSL 2 in Windows Server 2022 is very saddening…
My cloud vendor only supports LTSC Versions… So I can only use Server 2019 or 2022 Neither of them supports WSL2 … That’s No - No 😭 Please make WSL2 supported either 2019 or 2022 OR BOTH if you can 👍
In that case, update wsl.exe tool on windows server that it will not list version 2 options in help
What’s the point ? It was working on previous builds, what’s the point of removing it ?
That’s a nonsense.
Completely disagree on this decision.
Not yet!
@craigloewen-msft are there any updates with regard to WSL2 on Windows Server 2022?
The integration between a build system running on Linux environment while cross compiling to Windows (among others) and the ability to execute the tests via the Linux environment is a great feature of WSL2 and as an underline framework for CI.
@karstennilsen
Don’t run distro as
Administratoror it won’t worked. create a user withAdministratorsgroup and try again. It worked for me.Not having WSL2 supported on Windows Server makes development more difficult for us - developers on our team use WSL to build Linux binaries using desktop Windows, but our build server runs Windows Server - not Windows desktop. Now we cannot use our build server (Windows Server) to build Linux binaries in the same way that developers do. Hopefully WSL2 is supported by Windows Server in the future. For now this limitation of Windows Server is forcing us to continue to use WSL1 rather than WSL2.
no 😢
So sad
@aPinat it appears the last WSL2 compatible build of Server was 20241 and that time bombed out on 1/31 so you can no longer start WSL without setting your clock back but then TLS and everything else goes up in smoke.
I have confirmed that the recently released build 20313 still has the same behavior you listed above. It would be nice if Microsoft would at least broach the subject…
NO
Windows Server é uma merda!
NOOOO
Hi @craigloewen-msft, are there plans to backport this change to Windows Server 2019?
Thank you @craigloewen-msft
@ssbarnea At a minimum, it’ll be when https://github.com/actions/virtual-environments/blob/main/images/win/Windows2022-Readme.md is incremented past Build 740. It’s currently Build 707 (the last regular update) and that happened within a few days of the update itself being released. So probably mid-June for that.
I hit an issue earlier this year that suggested the Virtualisation Platform (used by both WSL2 and Hyper-V container isolation) isn’t enabled on the Server 2022 GitHub runners, so that may need to be enabled as well. https://github.com/marketplace/actions/setup-wsl agrees that Hyper-V is not enabled on the
windows-2022image; so it’s likely that even after the WSL2-supporting version of Server 2022 is deployed, a ticket at https://github.com/actions/virtual-environments/issues/ would be needed. Existing https://github.com/actions/virtual-environments/issues/1481 and https://github.com/actions/virtual-environments/issues/183 contain relevant history too, and the latter suggests that something in their infrastructure prevents Hyper-V nested isolation from working, or at least it used to.So you may find that a self-hosted runner is your only option there, sadly.
20H2 EOL is in 2 days, Craig. May I ask if you have an issue with DDA and WS2?
@karstennilsen Maybe worth trying some of the solutions in #5768? Otherwise, I’d suggest opening a new issue, since this issue is already quite long, has a lot of subscribers, and is Closed so may not get the attention you need.
Thanks @craigloewen-msft
looking for updates on this as well…
@slonopotamus yes Windows Server 2004 has reached end of life, so for a supported version please use Windows Server version 20H2. I was trying to explain where it would actually run, so I’ll edit the wording in the post above to be clearer.
Thank you very much! We definitely want/need 2022 support for WSL2 and this sounds like a for sure thing at this point from your remarks @craigloewen-msft, thank you!
Not as far as I understand. If you’re using AKS on Azure Stack HCI or Windows Server 2019 Datacenter, then the cluster is using Linux VMs, not WSL2.
It’s really unfortunate since I was expecting 2022 to have WSL2 so we could run tests for Docker on Windows (Linux containers). GitHub Actions and Azure DevOps Pipelines use Windows Server only so we won’t be able to do anything.
Prob
Try to use docker desktop in production without wsl2, OSM maps for example. Is bloody hell. Docker not always start with hyper-v, and preparing custom WS builds with docker+hyper-v did not work. In W10 all work, but only 10 TCP connection. So we should give up and migrate to linux?