WSL icon indicating copy to clipboard operation
WSL copied to clipboard

wsl: Unknown key 'wsl2.memory' 'wsl2.networkingMode'

Open EBrookeLoreto opened this issue 1 year ago • 3 comments

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

  1. Create /etc/wsl.conf
  2. 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

EBrookeLoreto avatar Jun 04 '25 10:06 EBrookeLoreto

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'.

github-actions[bot] avatar Jun 04 '25 10:06 github-actions[bot]

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.

0xbadfca11 avatar Jun 04 '25 12:06 0xbadfca11

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.

EBrookeLoreto avatar Jun 04 '25 12:06 EBrookeLoreto