wsl: Unknown key 'wsl2.memory' 'wsl2.networkingMode'
Windows Version
Microsoft Windows [Version 10.0.26100.4061]
WSL Version
2.5.7.0
Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
Kernel Version
6.6.87.1-1
Distro Version
Ubuntu 24.04
Other Software
Docker Desktop (Windows), version 28.1.1, build 4eba377
Repro Steps
- Create
/etc/wsl.conf - Set the following:
[wsl2] memory=16G networkingMode=mirrored
Expected Behavior
WSL should start normally and use the values provided. This has worked for many years up until this week and two users are seeing the issue. I suspect a WSL update has caused this.
Actual Behavior
The following is printed in the WSL output when starting the distro:
wsl: Unknown key 'wsl2.memory' in /etc/wsl.conf:12
wsl: Unknown key 'wsl2.networkingMode' in /etc/wsl.conf:13
Diagnostic Logs
No response
Logs are required for review from WSL team
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs
Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1
The script will output the path of the log file once done.
If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here
Once completed please upload the output files to this Github issue.
Click here for more info on logging If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.
https://learn.microsoft.com/en-us/windows/wsl/wsl-config#wslconfig These are settings of virtual hardware that must be finalized before the WSL2 will start. This is not an item that can be set in /etc/wsl.conf. It may have just been silently ignored until now.
https://learn.microsoft.com/en-us/windows/wsl/wsl-config#wslconfig These are settings of virtual hardware that must be finalized before the WSL2 will start. This is not an item that can be set in /etc/wsl.conf. It may have just been silently ignored until now.
Hi, thanks - I'm pretty sure these settings (at least used to) work even in here but I always wondered how as it's pre-boot. I'll try moving them to %USERPROFILE%.wslconfig. Thanks.