WSL2
Warning “wsl2” mode is experimental
⚡ Requirement | Lima >= 0.18 + (Windows >= 10 Build 19041 OR Windows 11) |
---|
“wsl2” option makes use of native virtualization support provided by Windows’ wsl.exe
(more info).
An example configuration:
limactl start --vm-type=wsl2 --mount-type=wsl2 --containerd=system
# Example to run Fedora using vmType: wsl2
vmType: wsl2
images:
# Source: https://github.com/runfinch/finch-core/blob/main/Dockerfile
- location: "https://deps.runfinch.com/common/x86-64/finch-rootfs-production-amd64-1690920103.tar.zst"
arch: "x86_64"
digest: "sha256:53f2e329b8da0f6a25e025d1f6cc262ae228402ba615ad095739b2f0ec6babc9"
mountType: wsl2
containerd:
system: true
user: false
Caveats
- “wsl2” option is only supported on newer versions of Windows (roughly anything since 2019)
Known Issues
- “wsl2” currently doesn’t support many of Lima’s options. See this file for the latest supported options.
- When running lima using “wsl2”,
${LIMA_HOME}/<INSTANCE>/serial.log
will not contain kernel boot logs - WSL2 requires a
tar
formatted rootfs archive instead of a VM image - Windows doesn’t ship with ssh.exe, gzip.exe, etc. which are used by Lima at various points. The easiest way around this is to run
winget install -e --id Git.MinGit
(winget is now built in to Windows as well), and add the resultingC:\Program Files\Git\usr\bin\
directory to your path.