Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL2 Support for Windows Server 2019 #678

Closed
kamalmaheshwari opened this issue May 13, 2020 — with docs.microsoft.com · 51 comments
Closed

WSL2 Support for Windows Server 2019 #678

kamalmaheshwari opened this issue May 13, 2020 — with docs.microsoft.com · 51 comments

Comments

Copy link

What's the plan to support WSL2 on Windows Server 2019? We are eagerly waiting to run Linux containers on Windows Server 2019 platform


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

  • ID: 233355e5-2fe3-a827-a1bf-ef1ae3ee5f36
  • Version Independent ID: 991e4422-12dc-68a6-21a6-9741710fd47a
  • Content: WSL 2
  • Content Source: WSL/wsl2-index.md
  • Product: dev-environment
  • Technology: windows-subsystem-for-linux
  • GitHub Login: @craigloewen-msft
  • Microsoft Alias: crloewen
@TBBle
Copy link
Contributor

TBBle commented Jun 20, 2020

Since WSL2 was introduced well after Windows Server 2019, I cannot see that it would be backported to an LTSC version. I haven't confirmed this, but the Windows Server, version 2004 SAC release should have WSL2 support. The Windows Server, version 2004 SAC release notes are focused on the container image release, even though ISO releases and cloud provider VMs have been appearing since May.

@chara1ampos
Copy link

chara1ampos commented Sep 1, 2020

@TBBle the 2004 version has no desktop support. Only LTSC versions have desktop support. It is a sad situation that we have to wait until year 2022 or 2025 for a new Windows Server LTSC, just to be able to use WSL2, by which time it may well be obsolete. I will have to downgrade a 28 core workstation to regular Windows 10 just to use WSL2 and CUDA, but then I will lose the ability for multiple users to be logged in. Microsoft needs to do (a lot) better if they want Windows Server to keep up with Linux.

@TBBle
Copy link
Contributor

TBBle commented Sep 2, 2020

@chara1ampos: Given that it's 2-3 years between LTSC releases, and Windows Server 2019 was based on Windows 10 1809, there is a strong expectation of an LTSC release in 2021.

You could jump forward to the vNext LTSC preview, perhaps? Given the timing, this suggests we might get a Windows Server LTSC release paired with Windows 10 21H1, as there's been no indication yet that 21H1 has forked from the "active development builds".

@therealdandecker
Copy link

therealdandecker commented Nov 24, 2020

I can confirm after testing tonight WIndows Server 2019 Preview that even in the preview release of 2004 LTSC with desktop experience (I typically use server core but wanted to see) that WSL2 is not functioning; I did an install with the same setup as on my windows 10 box where I have it running and could not get it to run either Docker or Ubuntu in Version 2.

I did read that the Linux kernel was not included in the preview releases, but I am unclear as to what that meant, i.e. is it not supported or simply its moved beyond preview releases.

@TonyTwoStep
Copy link

Also can confirm the above. I'm on the latest preview release of Server 2019 (based on 2004)

The commands
wsl --set-default-version 2 or wsl --set-version <distro> 2
just output the help message.

Docker EE doesn't use WSL2 and when attempting to force it or Docker Desktop to do so it errors out saying it cannot parse the output of the wsl command (which is just the help message). Even tried building the WSL kernel from source and that didn't work...

@TBBle
Copy link
Contributor

TBBle commented Dec 1, 2020

Yeah, it sounds like the wsl binary is still from WSL1, if it doens't know the --set-default-version parameter, which suggests the whole subsystem is WSL 1 still.

Same problem has been reported at https://techcommunity.microsoft.com/t5/windows-server-insiders/wsl-2-not-working-after-installing-20262/m-p/1928823.

Apparently it used to work: https://techcommunity.microsoft.com/t5/windows-server-insiders/how-to-install-wsl-2-on-windows-server/m-p/858359

@awakecoding
Copy link

awakecoding commented Dec 9, 2020

I would be interested as well, especially if the Linux MongoDB container works correctly with a docker volume under WSL2. I have a multi-container application using Windows containers on Windows, but there are critical issues that have been known for years that prevent MongoDB (and possibly other databases) from working correctly inside Windows containers. At this point I don't care if we have to use Windows containers or Linux containers, all I really want are containers on Windows Server 2019.

@therealdandecker
Copy link

therealdandecker commented Dec 9, 2020 via email

@awakecoding
Copy link

@therealdandecker I agree it would definitely be better to have an officially supported option to run Linux containers on the latest LTSC release of Windows Server with a GUI. If WSL2 is added only on the upstream semi-annual channel, it would be very difficult to get customers to use it, as a lot of people still just want Windows Server + GUI and RDP (even though it may seem like a bad thing, it's what a lot of people do).

But realizing that getting Linux containers to run properly (including databases that are very tied to specific filesystem i/o calls) on Windows Server, I would settle for simply using Windows containers on Windows, as this is the only native option. However, even Windows containers on Windows suffer from severe limitations and critical issues, so we are stuck with no good option in the end.

WSL2 + proper database support, or Windows containers on Windows with bug fixes for the issues preventing databases from working, but we've got to have at least one of the two and fast. Otherwise, this really means that if you can put up with the long list of limitations that come with Windows containers, you are still stuck without containerized database support, which is ridiculous.

docker-library/mongo#385
microsoft/Windows-Containers#37

@therealdandecker
Copy link

therealdandecker commented Dec 10, 2020 via email

@den-run-ai
Copy link

den-run-ai commented Feb 2, 2021

@shanselman I really wanted to use WSL2 that you advertised. But there is no VM with Windows Server + WSL2 that I can run with it in the cloud! I guess going back to Linux ¯\_(ツ)_/¯

@TBBle
Copy link
Contributor

TBBle commented Mar 7, 2021

There is a ticket specifically for WSL2 on the now-announced Windows Server LTSC 2022 (late 2021) microsoft/WSL#6301. The current ticket, being a report against the docs, is probably not bringing much visibility to a feature request.

The documentation does currently correctly state that you need a newer build of windows for WSL2 than Windows Server 2019, and actually explicitly says "Windows 10" is the requirement; the Windows Server instructions don't mention WSL2 at all, but no released Windows Server LTSC version has a new enough kernel build for WSL2 anyway.

@awakecoding
Copy link

@TBBle WSL2 + Linux containers on Windows Server appear to be dead in the water, unfortunately. I managed to get a clearer statement answer twitter: https://twitter.com/WSV_GUY/status/1358522964052832257?s=19

So the current thinking is that WSL2 is great as a developer tool on Windows 10, but supporting it officially on Windows Server would give people the wrong idea since they might start using it for production workloads.

The thing is that this is precisely what most people waiting for WSL2 on Windows Server want to do it with: run production workloads. I don't see a reason why it would not be possible to make it run unofficially, but it'll always be an unsupported option without Microsoft's stamp of approval.

Unless someone can convince Microsoft otherwise, I think WSL2 will remain a Windows 10 developer toy, unfortunately. It's just very frustrating because WSL2 correctly handles filesystem operations required by databases, so it's almost perfect as-is, if only it could be made official.

@therealdandecker
Copy link

therealdandecker commented Mar 7, 2021 via email

@awakecoding
Copy link

awakecoding commented Mar 7, 2021

@therealdandecker there used to be an LCOW effort that didn't really go beyond the experimental stage, so maybe they just decided on never doing it back then. It's sad because WSL2 is what the original LCOW should have been, so they now have a good basis to make it work.

The issue here is that even Windows containers on Windows have several unfixed issues, starting with the lack of graceful shutdown support. Most databases either don't have official images (SQL Server 2019! Official Linux containers only) or run into issues that ought to be fixed in Docker for Windows (MongoDB).

From what I can see, they now have their eyes on AKS + Azure Stack HCI, while making some fancy GUIs in Windows Admin Center to "ease using Windows containers". That's not going to work unless they give "simple" containers a lot more love.

I think one of the unspoken reasons for not wanting Linux containers on Windows is because they don't really know how to make this thing integrate well with the Windows security system. It's literally a foreign thing running inside Windows, and how are AVs going to deal with that exactly? And I'm not even talking about how most AVs destroy Docker for Windows by default and barely even have docs on how to make it work correctly.

My guess is they hope most customers would migrate to Kubernetes for their container workloads and simply stick to Windows containers on Windows, and Linux containers on Linux, which means having a pool of Windows and Linux nodes inside a Kubernetes cluster. This is absolutely overkill for 80% of use cases, but that's what seems to be the target right now.

@TBBle
Copy link
Contributor

TBBle commented Mar 7, 2021

As far as I can tell from in-passing GitHub PR discussions with Windows Container Platform team members, LCOW is not dead, and is still being actively supported in hcsshim and containerd by them. Docker are less-supportive: docker/for-win#6470. That doesn't specify what their use-cases are, and LCOW may be considered a developer-only feature as WSL2 apparently is; I've never tried it on Windows Server.

I had hoped that WSL2 would lead to WSL2-based LCOW, particularly since WSL2 is using the same underlying Windows infrastructure as HyperV-isolated containers, and on the Linux side your WSL2 distros are containers, so things would just work, but for now I guess Docker Desktop's "Docker-in-Docker" approach for Linux containers in WSL2 is the closest we have.

@Florian-cypheR
Copy link

Hi there.
I am in trouble because i have established all my development strategy on deploying a web app through a Docker's container installed on a Windows Server 2019.
To make a long story short : i have spent a long time on trying to make a linux containers (ShinyProxy to be exact) works on WS19 before i found this tread.

There is any workaround to make docker's Container works on WS19 ?

@TBBle
Copy link
Contributor

TBBle commented Mar 30, 2021

There is any workaround to make docker's Container works on WS19 ?

As a workaround, try Docker's Hyper-V mode, perhaps.

@John0King
Copy link

I want docker for windows it because it have a GUI, and I just can not believe that we can not use wsl2+docker with windows server with UI in 2021.3.31.
anything stop you make wsl2 a standalone software instead of depends on OS depends on OS depends on OS

IE depends on OS , it's die.
Old Edge depends on OS , it's die.
UWP depends on OS, it's dying.
WSL2 depend on OS, it's ~~~~~

what can I say ? there are reasons that windows server lose the market for Server OS .

@Florian-cypheR
Copy link

There is any workaround to make docker's Container works on WS19 ?

As a workaround, try Docker's Hyper-V mode, perhaps.

I have trying it on the Windows Admin Center and it doesn't work because a functionnality is not installed. I did the same on PowerShell but the daemon refuse to launch due to unsufficients rights.
I'm sure that Hyper-V and the containers are installed but perhaps i miss something - i'll you tell if i find something later.

Nonetheless : thanks for the help 👍

But...
As you guys highlight it : it seems that docker won't work well before the release of the WS2022... in the hypothesis that Microsoft engage itself into WSL2.

Wait and see ? 🤔

@therealdandecker
Copy link

therealdandecker commented Apr 1, 2021 via email

@John0King
Copy link

in fact, not every cloud virtual machine support Hyper-V, so it even not a option for docker desktop + hyper-V

@therealdandecker
Copy link

therealdandecker commented Apr 12, 2021 via email

@John0King
Copy link

so wsl2 can not be use in a VM environment that do not support the nest virtualization ?

@TBBle
Copy link
Contributor

TBBle commented Apr 12, 2021

I'm fairly sure LCOW works without virtualisation, although it doesn't work in many other important ways, so it's usage is very limited.

Other than that, you will need virtualisation of some kind in order to run Linux containers on a Windows host.

@matsmcp
Copy link

matsmcp commented Apr 15, 2021

Another vote for WSL2 on 2019/2022.
We need a WSL subsystem on a supported server with a GUI and a decent lifecycle.
And since there is a huge difference in the level of functionality between WSL1 and 2 the later is the preferred

@matsmcp
Copy link

matsmcp commented Apr 15, 2021

Also https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq should be updated.
The statement "WSL 2 is available on all SKUs where WSL is currently available, including Windows 10 Home." should be changed so it is made clear that it only applies to Win 10 Sku:s, not server SKU:s

@therealdandecker
Copy link

therealdandecker commented Apr 15, 2021 via email

@diplopito
Copy link

diplopito commented Apr 30, 2021

What about this: https://www.thomasmaurer.ch/2019/08/how-to-install-wsl-2-on-windows-server/ ? Though:

Remember this is currently in preview, and not for production use

@therealdandecker
Copy link

therealdandecker commented Apr 30, 2021 via email

@diplopito
Copy link

diplopito commented Apr 30, 2021

Unfortunately for me neither. As mentioned on this thread, must have been dropped for security and performance reasons. The author in the comments says:

It doesn’t work with Windows Server 2019. You need “Windows Server Insider Preview build 18945 or higher”

Followed by another comment:

Just a note for those who are trying now on Windows Server Preview (actual build 20287).
The WSL2 bits are broken from build 20251 onward.
Look here to download the last build where WSL2 works and don’t do an in-place upgrade.
https://techcommunity.microsoft.com/t5/windows-server-insiders/wsl-2-not-working-after-installing-20262/m-p/2109063/highlight/true?WT.mc_id=modinfra-0000-thmaure#M1601

Sorry for the noise on the thread.

@romerod
Copy link

romerod commented May 4, 2021

What about this?

https://docs.microsoft.com/en-us/windows/wsl/install-on-server

Is it V1? Documentation is really confusing

@TBBle
Copy link
Contributor

TBBle commented May 4, 2021

That's correct, the Windows Server instructions only cover WSL, as they predate WSL2 and have not been updated to cover WSL2. I'm not even sure if WSL2 works on Windows Server SAC releases. I assume it did, since it was working on LTSC up until recently.

The TOC just says "Install WSL & update to WSL 2", but the page with the WSL2 instructions is titled "Windows Subsystem for Linux Installation Guide for Windows 10".

So you're also correct, the documentation is confusing. ^_^

@therealdandecker
Copy link

therealdandecker commented May 4, 2021 via email

@diplopito
Copy link

diplopito commented May 4, 2021

I use it as a developer and can test simultaneusly on Ubuntu 16.04, 18.04 and 20.04, works perfectly. But from a security perspective, it is a bit scary that you can have access to all your Windows partitions and do with the files whatever you want.

@milkshakeuk
Copy link

We use Windows Server 2019 as teamcity build agents and want to use docker in teamcity with support for linux containers and now it sounds like this is not going to happen and that we need a linux based build agent? pfff, I understand that they dont want to use WSL2 for production hosting but as a CI/CD tool? did they not think about this workload?

@slonopotamus
Copy link

slonopotamus commented Oct 12, 2021

I think, it is safe to assume that WS2019 is not going to have any further feature updates given that WS2022 was released. And Microsoft clearly stated that WSL2 is not going to happen on WS2022 too. So I believe this issue should be closed as WEKNOWBETTERWHATYOUNEED WONTFIX.

@awakecoding
Copy link

I think it is obvious that it won't happen for Windows Server 2019, but maybe there's hope with Windows Server 2022 using the new Windows Subsystem for Linux Preview available on the store. Yes, I know, the store is not exactly very practical on Windows Server, but I don't see why it wouldn't be possible to extract the contents of the msix bundle to try and run it directly on Windows Server 2022. The main difference is that the store version is no longer tied to Windows Updates: https://devblogs.microsoft.com/commandline/a-preview-of-wsl-in-the-microsoft-store-is-now-available/

@therealdandecker
Copy link

therealdandecker commented Oct 13, 2021 via email

@biiiipy
Copy link

biiiipy commented Oct 13, 2021

For us, the effect is that, without WSL2 support on Server, we'll be moving to native linux VMs and containers, and it's a first step in moving away from MS stack. Small things lead to big changes MS...

@ReFleXzZ
Copy link

This is very sad, since I need WSL2 running on my Windows Server 2022 Datacenter.. It's really unfortunate, since most containers I need, won't run on wsl1. And Hyper-V does indeed use a higher workload and is much slower in it's reaction times to user input. Really frustrating, that it's still not a thing in the 2022 Server.

To be honest I never liked Windows that much, but I thought that Windows Server 2022 would indeed be used a lot more than before, since cloud computing + virtualization have become a really big thing and all these new features were implemented. I suggest Microsoft implements WSL2 for at least Windows Server 2022 or Microsoft will loose much important companies, since it's more hasslefree to deploy containers on linux than it is on Windows. The same counts for Kuberenetes in my opinion.

@NaruZosa
Copy link

Thanks a lot Microsoft, we've just migrated away from Server 2019 Datacenter Edition.

@ordersinrandom
Copy link

Nowadays most of the new server side programs are containerized, in docker, and run with k8s. This is by default how many of the development team works except those with legacy technology that cannot be packed. That means in many cases those containers simply CANNOT be deployed on windows server in any production sense. Naturally people just moves away from windows server just because of this.

@craigloewen-msft
Copy link
Collaborator

craigloewen-msft commented Jan 28, 2022

Hi folks, I've made a statement on the microsoft/wsl GitHub repo to help clarify this. I'll reproduce it here:

"""
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 versions 2004 and 20H2. 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.
"""
microsoft/WSL#6301 (comment)

Please follow this thread on the WSL GitHub repo for further updates on WSL and Windows Server. (I'll be closing this one out for house keeping purposes)

@craigloewen-msft
Copy link
Collaborator

WSL 2 distros are now enabled on Windows Server 2022, you can get access to it right away by installing a KB. You can read more at this comment:

microsoft/WSL#6301 (comment)

@butkandrius
Copy link

butkandrius commented Jun 20, 2022

Hi, I read lots of comments, so is no way how to start Linux containers on Windows Server 2019? With current VM Windows containers are working fine but when I switch to Linux containers and try to run them I am getting this error
failed to start service utility VM (createreadwrite): hcsshim::CreateComputeSystem feed74e37d12e5f46740b066cb1d49fca497ebad70755bcd8586d26f43ff74ce_svm: The virtual machine could not be started because a required feature is not installed . Even though hyper-V is enabled and all the system requirements met.

@TBBle
Copy link
Contributor

TBBle commented Jun 21, 2022

You may still be able to run containers user the Docker Desktop Hyper-V backend, although Docker Desktop does not formally support Windows Server, as far as I recall.

You should also be able to use LCOW (v1)-based containers, but Docker has deprecated support for that and will drop it in the next major release, and Microsoft also considers it deprecated. Although the error message you got suggests that you got past that point, and are hitting a lower-level issue. That said, LCOW was never very good, it had a lot of limitations that were never resolved, which is why everyone has deprecated it in favour of future containerd-based approaches which are currently (AFAIK) still WIP.

@therealdandecker
Copy link

therealdandecker commented Jun 21, 2022 via email

@TBBle
Copy link
Contributor

TBBle commented Jun 22, 2022

As far as I can see in the release notes, Docker Desktop has most-recently deprecated Windows 1709 (build 16299). They only formally support Windows 10 versions still in servicing, so https://docs.docker.com/desktop/windows/install/ lists Windows 10 21H1 or higher (20H2 for Enterprise/Education) but even if they are enforcing that in the installer, an installer from early-mid 2021 (when the 30-month support window for Windows 10 version 1809 expired) would still allow installation. Certainly the underlying Docker Engine still supports Windows Server 2019; the upcoming Docker Engine 22.06 release lifts the minimum Windows version to Windows Server 2019.

Windows 10 Enterprise 2019 LTSC is still in Mainstream support until January 2024, but I assume Docker Desktop isn't consideration the LTSC versions of Windows 10, since they're intended for specialised devices.

@olsonperrensen
Copy link

Still no support for build 17763 (LTSC 2019) after two years and four months.

@TBBle
Copy link
Contributor

TBBle commented Sep 26, 2022

I don't think there's any reason to expect WSL2 to start working on LTSC2019, since it also was never working on the Windows 10 version of that same kernel, so it's quite possible that the Windows kernel-level support needed for WSL2 was simply not present until 19041 (20H1).

Windows Server LTSC 2019's OS-level feature set was basically fixed at release in 2018.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests