microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.47k stars 822 forks source link

WSL 2 broken on Windows Server Preview (since change to fe_release branch) #6301

Closed aPinat closed 3 years ago

aPinat commented 3 years ago

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

dennisameling commented 3 years ago

Can confirm the --set-default-version 2 and --set-version Ubuntu 2 commands aren't working in Windows Server 2022 (build 20298.fe_release.210220-1636)

image

buvinghausen commented 3 years ago

@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....

buvinghausen commented 3 years ago

@benhillis @bpulliam & @craigloewen-msft is there an update? I just tried again with build 20317 and it's the same behavior as listed in here. It's been broken for over 4 months now can Microsoft at least acknowledge the problem so it can be remedied in the future?

LubomirH commented 3 years ago

Still the same in the build 20324 :(

RobertSpir commented 3 years ago

stll broken in 20344, which even removed timebomb and cannot be activated with the preview keys...

Oosl commented 3 years ago

same issue in widnows server 2022 20348.11

craigloewen-msft commented 3 years ago

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.

RobertSpir commented 3 years ago

In that case, update wsl.exe tool on windows server that it will not list version 2 options in help

craigloewen-msft commented 3 years ago

I agree, that's a great action item for us to take for future server versions. I've filed a bug for that on the team.

buvinghausen commented 3 years ago

@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?

Damasker commented 3 years ago

Prob

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.

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?

TBBle commented 3 years ago

That's correct. Per https://github.com/microsoft/WSL/issues/6301#issuecomment-858816891, the advice for hosting Linux production workloads on Windows Server is Linux in a VM, or for containerised workloads, have Linux and Windows nodes available in a Kubernetes deployment.

Squall124 commented 3 years ago

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.

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.

cvb941 commented 3 years ago

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...

catthehacker commented 3 years ago

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.

DVLP commented 3 years ago

I was hoping that once LTSC version comes out the support for WSL2 will be restored as it was already working in older Windows Server insider builds. Unfortunately it's still broken. Anyone found a hack to i.e. replace some system files from an older build where WSL2 used to work?

akbaryahya commented 3 years ago

so it just works without "server" label :(

vnkazna commented 3 years ago

Windows Server é uma merda!

slonopotamus commented 3 years ago

So, do I understand correctly that WSL2 will work if I install Azure Kubernetes Service onto Windows Server Datacenter?

TBBle commented 3 years ago

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.

3JoB commented 3 years ago

And using WSL (WSL2) in Windows Server 2022 has a chance to cause a blue screen error that the kernel security check fails

farrukhfida commented 3 years ago

I agree, that's a great action item for us to take for future server versions. I've filed a bug for that on the team.

is it fixed in Windows server 2022 datacenter? As I have tried but WSL is not switching to wsl2 and I have to use hyper vm to use docker desktop. Any suggestion that could help to fix this issue and i can run docker desktop with WSL2 support on windows server 2022?

TBBle commented 3 years ago

is it fixed in Windows server 2022 datacenter?

I'm pretty sure "future server versions" here meant after Windows Server 2022, which was already "RTM" at the time of that comment.

Also, the "action item" was removing the WSL2 option from wsl.exe, not "Make WSL2" work. There remains, as far as I've seen publicly, no intention to support WSL2 (or Docker Desktop, technically) on Windows Server now or future versions.

buvinghausen commented 3 years ago

@TBBle which is dumb because it was working perfectly in the October 2020 builds.....

ohault commented 3 years ago

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.

It is a complete nonsense which favors an unsustainable approach and a waste of unacceptable resources at this time with as a fine example AKS on Azure Stack HCI (aka the killed Hyper-V Server 2022), while a native approach with NT kernel + WSL2 + K8s is the expected solution.

TBBle commented 3 years ago

If you're looking for Linux-based containers for k8s specifically, then WSL2 probably isn't the way to go anyway, long-term, since you're already running inside a container there; in effect the WSL2 backend for Docker Desktop is a Docker-in-Docker setup. Based on work being done in the hcsshim project, the path to k8s/Linux container support natively on Windows hosts (LCOW-but-not-awful-this-time) is likely to be through containerd, which is in-effect generalising the micro-VM mechanism used for WSL2 to run CRI Pods.

It might not be mature enough yet (I haven't tried), but that system runs Linux containerised workloads on Windows hosts, so in theory you could then run a WSL2-like experience, but you'd have to BYO cross-OS file sharing (i.e. 9p system) and tooling (wsl.exe).

To be clear, this is all my speculation, based on changes and work being done in some open MS repos, and things like hcsdiag working for both LCOW containers and the WSL2 stack. There's no formal roadmap for this I'm aware of, and if it doesn't work well, MS may well drop the direction; the formal Linux on Windows Hosts approach recommended by MS at this time is as described at https://github.com/microsoft/WSL/issues/6301#issuecomment-858816891, AFAIK.

falves1 commented 2 years ago

Are there any artificial limits n WSL2 if run under Windows 10? I read above "10 TCP connections". I need to run LXC containers, under WSL2, for a heavy load.

yhy729 commented 2 years ago

So sad

exxocism commented 2 years ago

no 😢

exxocism commented 2 years ago

NO

exxocism commented 2 years ago

NOOOO

jaredhagel commented 2 years ago

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.

craigloewen-msft commented 2 years ago

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.

slonopotamus commented 2 years ago

Windows Server 2004 is EOL since December 14, 2021, isn't it?

biiiipy commented 2 years ago

And 20H2 EOL is in a couple of months: 2022-05-10. I hope MS comes to their senses and realizes how important this is.

ylluminate commented 2 years ago

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!

craigloewen-msft commented 2 years ago

@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.

jaredhagel commented 2 years ago

@craigloewen-msft Great news! Is there a chance that this support will be back-ported to Windows Server 2019? Thanks!

exxocism commented 2 years ago

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.

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 :sob: Please make WSL2 supported either 2019 or 2022 OR BOTH if you can :+1:

slonopotamus commented 2 years ago

Currently WSL 2 distro support is not on Windows Server 2022, but we are investigating this.

@craigloewen-msft are there any updates with regard to WSL2 on Windows Server 2022?

craigloewen-msft commented 2 years ago

Not yet!

alonbl commented 2 years ago

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

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.

terrafirma2021 commented 2 years ago

20H2 EOL is in 2 days, Craig. May I ask if you have an issue with DDA and WS2?

mihailescu2m commented 2 years ago

looking for updates on this as well...

iambenmitchell commented 2 years ago

Any update? I want to run linux dockers/containers on Windows Server 2022 using WSL

akbaryahya commented 2 years ago

I don't think it's going to happen, the reason I want to use Windows Server is because I can completely delete the antivirus because it's useless and slow when building Java projects because the antivirus keeps scanning even when it's turned off and the filter folder.

sudo-kraken commented 2 years ago

It is ridiculous that you allow WSL1 but not 2 its hypocrisy, you can have it... but not with full kernel support, can you at least say why you wont allow this to be a fully functional kernel. Clearly it is what your users are wanting, when we are checking this after it being open for 6 months...

ylluminate commented 2 years ago

Sadly WSL2 has some serious trouble still that I think they may want to solve before moving it forward. They have a "schizophrenia" problem with networking between WSL1 vs WSL2 at the moment (check out these 591 comments for an example: https://github.com/microsoft/WSL/issues/4150).

iambenmitchell commented 2 years ago

Well until WSL2 is supported on Windows Server, people are going to run Windows 10/11 in the data center simply because a lot of people need to run docker or other container platforms and it is inefficient to run in a VM instead.

ylluminate commented 2 years ago

@iambenmitchell to be honest, I'm finding that running Proxmox on Hyper-V is more sane at the moment since it gives networking stability + management of LXCs (and Docker if you configure it to do so through some additional effort). Personally I think LXC mgmt via Proxmox is a little cleaner and visible, so to speak, for various applications.