actions / runner-images

GitHub Actions runner images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add WSL2 to the Windows 2022 image

nzbr opened this issue · comments

commented

Tool name

Windows Subsystem for Linux version 2

Tool license

Proprietary (included with Windows)

Add or update?

  • Add
  • Update

Desired version

2

Approximate size

No response

Brief description of tool

WSL2 allows running Linux applications on windows by using a Hyper-V VM running a real Linux kernel

URL for tool's homepage

https://docs.microsoft.com/en-us/windows/wsl/about

Provide a basic test case to validate the tool's functionality.

Describe "WSL2" {
  It "should be possible to install a wsl2 distro and run commands in it" {
    wsl --install -d Ubuntu
    wsl -d Ubuntu echo works | Should -Match "works"
  }
}

Platforms where you need the tool

  • Azure DevOps
  • GitHub Actions

Virtual environments where you need the tool

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 10.15
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Can this tool be installed during the build?

Installing WSL2 during the build is not possible due to the fact that enabling the required Windows features requires a reboot

Tool installation time in runtime

No response

Are you willing to submit a PR?

Yes

commented

Given that hosted runners do seem to support nested virtualization now, is it conceivable that WSL2 will be enabled on windows runners in the future?

@nzbr only larger runners officially support nested now, not the standard ones, unfortunately (yet), so we can not replace v1 with v2 for the time being. Eventually nested will be supported by the standard runners as well, but we have no ETA on this.