microsoft / microsoft/WSL

'The requested operation requires elevation' when installing WSL as SYSTEM

Open
#13,656 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

### Windows Version

Microsoft Windows [Version 10.0.26200.6584]

### WSL Version

0.0.0.0

### Are you using WSL 1 or WSL 2?

- [x] WSL 2
- [ ] WSL 1

### Kernel Version

_No response_

### Distro Version

_No response_

### Other Software

_No response_

### Repro Steps

This issue occurs on a fresh Windows installation when carrying out the following steps;
- Run cmd as Administrator
- Use PSExec to run cmd as SYSTEM (psexec -s -i -cmd.exe)
- Verify cmd is running as SYSTEM (whoami returns nt authority\system)
- Run wsl install (in our use case, wsl.exe --install --no-distribution --web-download --enable-wsl1, but the same occurs when just running wsl.exe --install)

### Expected Behavior

WSL should install as expected.

### Actual Behavior

The error 'The requested operation requires elevation' is returned, and wsl.exe exits.

While it might seem odd to run wsl.exe --install as SYSTEM, this is required when using deployment tools such as ConfigMgr to deploy a working WSL installation to end users. Using PSExec to run cmd.exe as SYSTEM allows us to test wsl.exe in this situation, without using ConfigMgr.

### Diagnostic Logs

_No response_

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

Reproduce the failure by running PsExec to open cmd.exe as SYSTEM, then run wsl.exe --install or the reported --no-distribution --web-download --enable-wsl1 command. The issue names no source files or tests, so start by tracing the WSL installation path that handles SYSTEM elevation. Done means installation succeeds when invoked as SYSTEM without the elevation error.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.