From Fedora Project Wiki

No edit summary
No edit summary
Line 3: Line 3:
= Description =
= Description =


In Fedora 42, a new image is being built that's intended to use with Windows Subsystem for Linux. This will allow users to have a simple, easy to set up Fedora environment for development and testing use. WSL manages a lightweight VM with Wayland, PulseAudio, and some extra filesystem mounts provided. The user's choice of distro, such as Fedora, is run in an isolated namespace with its own root image. Multiple distributions may be run side by side in different namespaces, sharing the same kernel.
In Fedora 42, a new image is being built for use with [https://learn.microsoft.com/en-us/windows/wsl/ Windows Subsystem for Linux] (commonly referred to as WSL). This will allow users to have a simple, easy to set up Fedora environment for development and testing use.


The Fedora changes are fully described at [[Changes/FedoraWSL]]
Multiple distributions may be run side by side in different namespaces, sharing the same kernel. Conceptually, the workflow is similar to a container, but it has been optimized to support an interactive Linux development & testing. WSL manages a lightweight VM with Wayland, PulseAudio, and some extra filesystem mounts provided. The user's choice of distro, such as Fedora, is run in an isolated namespace with its own root image. Filesystem state, including the root filesystem and home directories are also preserved between uses.
 
The Fedora changes are fully described at [[Changes/FedoraWSL]]. It is similar to the cloud and container images, but some developer-focused packages such as manual pages, wget, and vim have been added by default.
 
 
= Setup =
 
== Prerequisites ==
 
* Windows 11 (recommended). Windows 10 may work, but is not a focus as it will be [https://www.microsoft.com/en-us/windows/end-of-support end-of-life soon]
* Virtualization extensions must be available. If you are testing in a VM - be sure this is enabled in your VM settings. Some cloud services restrict this to specific instance types.
 
 
== Installing WSL ==
 
Setting up WSL is pretty simple. `wsl --install` will enable the hypervisor prerequisites, and prompt for reboot if needed. If a reboot is needed, you may need to run `wsl --install` a second time after reboot.  (TODO: verify the reboot steps). This will also install a default Ubuntu image. Fedora can be installed in the next step.
 
Full documentation is available at [https://learn.microsoft.com/en-us/windows/wsl/install]
 
 
== Installing Fedora ==
 
=== Downloading the Fedora WSL tarball ===
 
TODO: add a specific link, or a publishing page to get the latest tarball
 
=== Installing Fedora with wsl.exe ===
 
First, check the version of WSL you are using by running `wsl.exe --version`. Follow the steps below based on the version.
 
'''For WSL versions 2.4.4+:'''
 
# From the command line, install the tarball with `wsl --install --from-file .\path\to\Fedora.tar.xz`
# Enter the environment by running "wsl -d Fedora"
# When prompted, provide a username. This will be the default user, and it will be added to the groups for `sudo` usage
 
'''For WSL versions prior to 2.4.4:'''
 
(These steps assume you are using PowerShell)
 
# Make a directory for the Fedora distribution with `mkdir $ENV:LOCALAPPDATA\WSL\Fedora`
# Import the WSL tarball with `wsl --import Fedora $ENV:LOCALAPPDATA\WSL\Fedora .\Path\To\Fedora.x86_64-Rawhide.tar.xz`
# Enter the environment with `wsl -d Fedora -u root`
# Manually run `/usr/libexec/wsl/oobe.sh` to create the default user
# `exit` the environment logged in as root
# Enter the environment as the newly created user with `wsl -D Fedora -u <username>`


= Setup ''(optional)'' =
Optionally provide instructions to prepare the test environment.
</noinclude>
{{#if: {{{setup|}}}|= Setup =
{{{setup}}}|}}
= How to test =
= How to test =
<noinclude>
<noinclude>
Line 19: Line 59:
# Start here ...
# Start here ...
# Next do this ...
# Next do this ...
# Finally click that}}}
# Finally click that
 
}}}


= Expected Results =
= Expected Results =

Revision as of 04:50, 30 January 2025

(This page is a work in progress, we are still working on a date and will open a test day ticket within the next week)

Description

In Fedora 42, a new image is being built for use with Windows Subsystem for Linux (commonly referred to as WSL). This will allow users to have a simple, easy to set up Fedora environment for development and testing use.

Multiple distributions may be run side by side in different namespaces, sharing the same kernel. Conceptually, the workflow is similar to a container, but it has been optimized to support an interactive Linux development & testing. WSL manages a lightweight VM with Wayland, PulseAudio, and some extra filesystem mounts provided. The user's choice of distro, such as Fedora, is run in an isolated namespace with its own root image. Filesystem state, including the root filesystem and home directories are also preserved between uses.

The Fedora changes are fully described at Changes/FedoraWSL. It is similar to the cloud and container images, but some developer-focused packages such as manual pages, wget, and vim have been added by default.


Setup

Prerequisites

  • Windows 11 (recommended). Windows 10 may work, but is not a focus as it will be end-of-life soon
  • Virtualization extensions must be available. If you are testing in a VM - be sure this is enabled in your VM settings. Some cloud services restrict this to specific instance types.


Installing WSL

Setting up WSL is pretty simple. wsl --install will enable the hypervisor prerequisites, and prompt for reboot if needed. If a reboot is needed, you may need to run wsl --install a second time after reboot. (TODO: verify the reboot steps). This will also install a default Ubuntu image. Fedora can be installed in the next step.

Full documentation is available at [1]


Installing Fedora

Downloading the Fedora WSL tarball

TODO: add a specific link, or a publishing page to get the latest tarball

Installing Fedora with wsl.exe

First, check the version of WSL you are using by running wsl.exe --version. Follow the steps below based on the version.

For WSL versions 2.4.4+:

  1. From the command line, install the tarball with wsl --install --from-file .\path\to\Fedora.tar.xz
  2. Enter the environment by running "wsl -d Fedora"
  3. When prompted, provide a username. This will be the default user, and it will be added to the groups for sudo usage

For WSL versions prior to 2.4.4:

(These steps assume you are using PowerShell)

  1. Make a directory for the Fedora distribution with mkdir $ENV:LOCALAPPDATA\WSL\Fedora
  2. Import the WSL tarball with wsl --import Fedora $ENV:LOCALAPPDATA\WSL\Fedora .\Path\To\Fedora.x86_64-Rawhide.tar.xz
  3. Enter the environment with wsl -d Fedora -u root
  4. Manually run /usr/libexec/wsl/oobe.sh to create the default user
  5. exit the environment logged in as root
  6. Enter the environment as the newly created user with wsl -D Fedora -u <username>

How to test

Be as specific as required for the target audience.


  1. Start here ...
  2. Next do this ...
  3. Finally click that


Expected Results

The following must be true to consider this a successful test run. Be brief ... but explicit.


  1. Step #1 completes without error
  2. The system boots into runlevel 5
  3. Program completes with exit code 0

Optional (optional)

Optionally provide hints for exploratory testing.