F42 Change Proposal: Fedora WSL (Self-Contained)

Create Fedora Windows Subsystem for Linux Images

This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee.

Wiki
Announced

:link: Summary

Recent versions of Windows support running Linux guests via Windows Subsystem for Linux (WSL). These can be distributed via tarballs, Appx packages, or via the Windows Store. The purpose of this change is to start producing Fedora images for users of WSL.

Distributing images via the Windows Store requires agreeing to the store policies and developer agreement, which is something Fedora has historically not been comfortable with. This change proposal is to distribute a tarball. In recent versions of WSL (version 2.4.4 and greater), the user experience has been greatly improved for WSL images outside the store. These include allowing tarballs to distribute first-time setup scripts and icons as part of the distribution instead of as a Windows application, as well as click-to-install support for tarballs using the “.wsl” file extension. Therefore, this proposal will work best with version 2.4.4+ of WSL, although documentation will be provided for users on older releases.

:link: Owner

:link: Detailed Description

Recent versions of Windows support running Linux distributions using Windows Subsystem for Linux (WSL). In the latest version, WSL 2, a single virtual machine is managed by the Windows host and guest Linux distributions run as containers within it. For basic WSL support, Fedora needs to distribute a root filesystem tarball. The Fedora base container can already be used with WSL, but it is not ideal as it intentionally excludes documentation and non-essential tools. There also isn’t official documentation on how to use it with WSL.

The goal of this change is to complete the following:

Optionally, we can include a section on fedoraproject.org to ensure users can discover our WSL image.

:link: Feedback

:link: Benefit to Fedora

A dedicated image with documentation allows people to easily try out a Fedora environment from their Windows installations. When it comes time to install a Linux distribution on their computer, they can be more confident when choosing Fedora.

:link: Scope

  • Proposal owners:

  • Other developers:

  • Release engineering: #Releng issue number

  • Policies and guidelines: N/A (not needed for this Change)

  • Trademark approval: N/A (not needed for this Change)

  • Alignment with Community Initiatives:

:link: Upgrade/compatibility impact

:link: How To Test

For WSL versions 2.4.4+:

  1. Have access to a Windows installation with WSL 2.4.4+
  2. Run “wsl --install Fedora”
  3. Enter the environment by running “wsl -d Fedora”
  4. Use the interactive out-of-the-box experience script to set up a new user
  5. Install some applications, start some services, see if things fall over.

For WSL versions prior to 2.4.4:

  1. Have access to a Windows 10 or 11 installation (VMs should work)
  2. On the Windows host, download the WSL tarball from
  3. Open up a Windows terminal and install WSL itself with “wsl --install”
  4. Import the WSL tarball with “wsl --import Fedora C:\Users<username>\AppData\Local\WSL\Fedora .\Path\To\Fedora.x86_64.tar.xz”
  5. Enter the environment with “wsl -d Fedora -u root”
  6. manually execute the interactive out-of-the-box experience script to set up a new user
  7. Install some applications, start some services, see if things fall over.

:link: User Experience

:link: Dependencies

:link: Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) Don’t ship the tarball
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? No

:link: Documentation

Add a section somewhere in https://docs.fedoraproject.org/ (perhaps quick docs) with a short guide on installing the tarball. This will cover both older versions of WSL which require more manual steps as well as the newer, easier method of installation.

:link: Release Notes

Last edited by @amoloney 2024-12-03T17:27:29Z

Last edited by @amoloney 2024-12-03T17:27:29Z

5 Likes

How do you feel about the proposal as written?

  • Strongly in favor
  • In favor, with reservations
  • Neutral
  • Opposed, but could be convinced
  • Strongly opposed
0 voters

If you are in favor but have reservations, or are opposed but something could change your mind, please explain in a reply.

We want everyone to be heard, but many posts repeating the same thing actually makes that harder. If you have something new to say, please say it. If, instead, you find someone has already covered what you’d like to express, please simply give that post a :heart: instead of reiterating. You can even do this by email, by replying with the heart emoji or just “+1”. This will make long topics easier to follow.

Please note that this is an advisory “straw poll” meant to gauge sentiment. It isn’t a vote or a scientific survey. See About the Change Proposals category for more about the Change Process and moderation policy.

I mean this will have pros and cons. “Embrace, extend, extinguish” etc.

But users trying Fedora and dnf may make it easier to switch to Fedora full time. So can’t hurt, otherwise they use Ubuntu

2 Likes

Yesssssssssss.

Microsoft has changed a huge amount since the bad old days this quote comes from. They know for example that without first class linux support Azures is dead in the water.

I see this wsl change, that they worked on with redhat, as another sign of them knowing that linux is an advantage to them these days.

1 Like

No doubt. They simply also want to cement their dominance as desktop OS. This includes making Linux support so effortless, that people dont wipe out Windows.

But as said, if people want to work on it, I am sure this will not directly harm the Linux desktop. It would make Fedora accessible like that, otherwise people use Ubuntu.

1 Like

To maximize the value of Fedora within WSL, building mesa for WSL (i.e. including the d3d12 driver target) and shipping it would be fantastic. Such mesa builds would allow for using accelerated WSLg (GitHub - microsoft/wslg: Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios) which is the Wayland compositor on top of WSL.

As far as I can tell, for the d3d12 build target to happen, packaging some development header files is required, see 2115560 – Review Request: DirectX-Headers - Direct3D 12 headers

Personally, I have been using the existing Fedora Remix for WSL (GitHub - WhitewaterFoundry/Fedora-Remix-for-WSL: Fedora Remix for Windows Subsystem for Linux.), on and off. The major benefit of that remix, as far as I perceive it, is a well-defined and well-supported mesa including the d3d12 driver target. This enables me to use all my favourite (software engineering) tooling from within WSL - tooling such as IntelliJ or Visual Studio Code.

My current alternative path to using Fedora Linux is running a complete KDE Desktop Environment inside VMware Workstation. While I do prefer KDE over Windows, at times I have to face the real world - and my trust in Broadcom managing the future of VMware Workstation well is at an all-time low. Therefore I’d be ready to flip to exclusively using an upstream Fedora 42 with WSL and WSLg.

To provide additional perspective, “Arch Linux on WSL” provides mesa binaries including the d3d12 driver build target. This means that Arch Linux offers a very usable and very pleasant baseline environment to work with on WSL and WSLg out of the box.

2 Likes

Here is a bit of history on this wsl wayland feature raised in 2016.

At my former large enterprise workplace, Windows is the “corporate standard” for user workstations, while RHEL is used in data centers. Some “mission critical” POSIX command-line software was only available for macOS and Linux. Users whose work requires linux software are now allowed to use WSL, and have been using Ubuntu, but would prefer Fedora for better RHEL compatibility.

1 Like

Thanks for the details here!

I’ll certainly make note of this and see if there’s anything I can do to help move things along. It’d be great to have solid out-of-the-box support for WSLg.

1 Like

I have a PR for mesa to have (not to enable yet) a RPM conditional for d3d12 driver.
https://src.fedoraproject.org/rpms/mesa/pull-request/41

and a dedicated repo for testing it:
https://copr.fedorainfracloud.org/coprs/kwizart/wsl/

(still miss DirectX-headers official Fedora package, review is stalled. I can provide my own that solve most/all issues).

1 Like

This is really wonderful. I just saw it, and can’t test now because I’m at work, but I’m very happy to be able to use Fedora with WSL.

Big thanks to Jeremy Cline and anyone else who has been working on this.

Last time this was requested by the community, the official answer we got was “this is stuck at the lawyers level” ; I don’t think we got more than that. Did they do their homework this time? I hate having the feeling that the legal department is somewhat doing its thing obscurely and we can’t know if that’s really in our interest.

Anyway, if there was a real reason to refuse, years ago, to produce an official fedora tarball, what has technically changed since? @mattdm

If I’m not mistaken, the issue is/was not distributing a tarball - it’s signing the agreement that would let it be distributed directly by Microsoft. If MSFT is making it easier to consume tarballs of WSL distros, then AFAIK no legal agreement is required. It just needs to be compatible.

And I highly doubt you would, or will. Both work product and attorney client communications are never shared for (good) legal reasons.

That may not make those who want decisions to be made on pure technical grounds happy, but it is the way of the real world. If you want a further and more detailed explanation as to why you are not going to get more information, discuss the reasoning with your lawyer (who will be glad to explain it at their U&C fees).

This blog gives info on what the changes are and RedHat’s involvement, which I assume means that the legal side will be ok.

See What’s new in the Windows Subsystem for Linux in November 2024 - Windows Command Line

Indeed.

I am not a lawyer, and I was not involved in any previous effort to support WSL. Nor was I particularly excited to read all 56 pages of the App Developer agreement and store policies so I can’t even speculate at what the issues were.

However, with the recent changes the user experience for installing distributions outside the Store seems quite good, so that’s what this change proposal is about. Fedora won’t be in the Microsoft Store, but you will be able to download the tarball directly from Fedora and click-to-install. It’s not perfect, but it avoids whatever issues the Red Hat lawyers had with the developer agreement.

It would be lovely to get Fedora listed in the WSL command-line so users can just run wsl --install Fedora. I’m not sure if they’re planning to open that up to distributions outside the App Store, and there’s some complications there around ensuring the tarball is validated if it’s coming from a mirror, but we don’t need to get everything working in one go.

I can! :slight_smile:

Or, at least, I can summarize the one that’s made out of kryptonite: the agreement as it stands (or stood when I last looked at it) has language that says you agree to take all liability, and to completely indemnify Microsoft, with no limits. This is potentially a liability doubler. Imagine a patent troll finding something they claim is a violation embedded in our image — they’d sue both companies.

Or: of course the patent troll would probably not bother targeting some random individual, but they might still sue Microsoft, and then… under the agreement, that person is obligated to pay for Microsoft’s defense and any damages.

Microsoft’s position was something like sure, but you’re distributing it under licenses that say use at your own risk so you’re fine, right? and Red Hat’s was something like we are not about to mess around and find out.

Red Hat would prefer it worked the same way we work with hardware vendors: we produce it, they take it under the licenses we offer, and then they distribute it. It’s open source! That’s how it works! Microsoft said they don’t do that kind of thing. So: an impasse.

This is just my non-lawyer understanding of one part of the problem. There was probably a lot more in those 56 pages.

1 Like

A Fedora offering in WSL is long overdue!

Per the proposal, WSL 2.4.4+ is required. Windows 11, even at the 24H2 level is only WSL version 2.3.26.

So, this will require users to update to a Pre Release of WSL (wsl --update --pre-release). Is this a reasonable ask for the average non-power user base?

Could we think of it as a kind of soft launch? People who feel comfortable running a pre-release WSL can do it, people who don’t feel comfortable can wait.

I don’t know how often MS updates WSL, but the problem ought to go away on its own fairly quickly.

1 Like