microsoft / microsoft/WSL

Multiple simultaneous WSL2 kernels

Open
#4,967 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature wsl2
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

Since the announcement that WSL2 kernels are going to be distributed through Windows Update, a few scenarios come to mind where it would be nice to have two simultaneous WSL2 VMs, one with the old kernel and one with the new kernel.

The most obvious example is spinning down a docker swarm running on the old WSL kernel while spinning it up on the new kernel. This could allow for a 0-downtime update.

In general, services listening on the network could be brought up on the new WSL kernel, then the virtual network interfaces could be swapped (or something of that nature -- I don't know exactly how to best orchestrate such a switchover).

Aside from these scenarios, there is also the case where users want a custom kernel for some VMs, but the stable kernel for most situations. While I don't know what the future will hold, take for example WireGuard, which existed as a kernel patch. A stable Windows-provided kernel would still be ideal for other services, but a secondary WSL2 instance could allow a patched kernel for trying new features.


It's possible this feature starts looking like it should integrate with the Hyper-V management panels, in which case, it should! I think it would be okay for an "advanced" WSL2 scenario to require Windows 10 Pro and up.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue mentions WSL2 kernels, Docker Swarm, virtual network interfaces, and possible Hyper-V integration, but no files, tests, or entry points. Start by reviewing how WSL2 instances and kernels are currently managed; done would mean supporting simultaneous instances with different kernels and a workable service or network transition.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, docker
Domain
infrastructure, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.