Skip to content

Commit c0759e6

Browse files
author
Andrea Reale
committed
wsl2: cover custom WSL2 kernels
1 parent 0020f7d commit c0759e6

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

content/manuals/desktop/features/wsl/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,4 @@ Docker Desktop does not require any particular Linux distributions to be install
109109
- [Explore best practices](best-practices.md)
110110
- [Understand how to develop with Docker and WSL 2](use-wsl.md)
111111
- [Learn about GPU support with WSL 2](/manuals/desktop/features/gpu.md)
112+
- [Custom kernels on WSL](custom-kernels.md)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Custom kernels on WSL
3+
description: Using custom kernels with Docker Desktop on WSL 2
4+
keywords: wsl, docker desktop, custom kernel
5+
tags: [Best practices, troubleshooting]
6+
aliases:
7+
- /desktop/wsl/custom-kernels/
8+
---
9+
10+
Docker Desktop depends on several kernel features built into the default
11+
WSL 2 Linux kernel distributed by Microsoft. Because of that, **using a
12+
custom kernel with Docker Desktop on WSL 2 is not officially supported**
13+
and may cause issues with Docker Desktop startup or operation.
14+
15+
At the same time, we understand that in some cases it may be necessary
16+
to run custom kernels; Docker Desktop does not block their use, and
17+
some users have reported success using them.
18+
19+
If you choose to use a custom kernel, we suggest starting
20+
from the kernel tree distributed by Microsoft at their [official
21+
repository](https://github.com/microsoft/WSL2-Linux-Kernel) and adding
22+
the features you need on top of that.
23+
24+
We suggest to:
25+
- Use the same kernel version as the one distributed by the latest WSL2
26+
release (you can find the version by running `wsl.exe --system uname -r`
27+
in a terminal).
28+
- Start from the default kernel configuration as provided by Microsoft
29+
in their [repository](https://github.com/microsoft/WSL2-Linux-Kernel)
30+
and add the features you need on top of that.
31+
- Make sure that your kernel build environment includes `pahole` and
32+
its version is properly reflected in the corresponding kernel config
33+
(`CONFIG_PAHOLE_VERSION`).
34+

0 commit comments

Comments
 (0)