Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After installing latest WSL, get Wsl/E_ACCESSDENIED when trying to start/use WSL #9834

Closed
1 of 2 tasks
AnthonyHayes72 opened this issue Mar 23, 2023 · 26 comments
Closed
1 of 2 tasks

Comments

@AnthonyHayes72
Copy link

Windows Version

Microsoft Windows 10 Enterprise 19044.2728

WSL Version

Store version - tying to run wsl.exe gives error

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

same error using wsl.exe

Distro Version

Ubuntu 20.04.5 LTS

Other Software

N/A

Repro Steps

Enable Windows Subsystem for Linux feature and restart
Use admin command prompt...
wsl --set-default-version 2
wsl --install -d Ubuntu

All good so far

wsl --update (or install latest from microsoft store)

After install completes, any further interactions give error...

Error code: Wsl/E_ACCESSDENIED

or

Invalid value for registry
Error code: Wsl/0x80040153

If command actioned from admin console.

Similarly selecting WSL from start menu gives ACCESSDENIED error

Expected Behavior

WSL commands to be executed correctly

Actual Behavior

image

image

Diagnostic Logs

WslLogs-2023-03-23_10-04-05.zip

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 23, 2023

Thank you for reporting this @AnthonyHayes72. Can you share the output of wsl.exe --version ?

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 23, 2023

Can you also share a screen shot of HKEY_LOCAL_MACHINE\Software\Classes\Interface\\46f3c96d-ffa3-42f0-b052-52f5e7ecbb08} ? I wonder if that key is in a bad state

@AnthonyHayes72
Copy link
Author

AnthonyHayes72 commented Mar 24, 2023

Thank you for reporting this @AnthonyHayes72. Can you share the output of wsl.exe --version ?

I cannot run wsl.exe when in this state, I get the same errors in the report for any wsl command.

@AnthonyHayes72
Copy link
Author

AnthonyHayes72 commented Mar 24, 2023

Can you also share a screen shot of HKEY_LOCAL_MACHINE\Software\Classes\Interface\\46f3c96d-ffa3-42f0-b052-52f5e7ecbb08} ? I wonder if that key is in a bad state

Thanks for looking into this - here's the reg key...

image

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 24, 2023

Can you also share a screen shot of HKEY_LOCAL_MACHINE\Software\Classes\Interface\\46f3c96d-ffa3-42f0-b052-52f5e7ecbb08} ? I wonder if that key is in a bad state

Thanks for looking into this - here's the reg key...

image

Interesting. Can you capture logs for wsl.exe --version ? I wonder if it would be easier to root cause the error from there

@AnthonyHayes72
Copy link
Author

Can you also share a screen shot of HKEY_LOCAL_MACHINE\Software\Classes\Interface\\46f3c96d-ffa3-42f0-b052-52f5e7ecbb08} ? I wonder if that key is in a bad state

Thanks for looking into this - here's the reg key...
image

Interesting. Can you capture logs for wsl.exe --version ? I wonder if it would be easier to root cause the error from there

Image shows workflow - wsl working until I do wsl --update

After update wsl --version produces error.

Log files attached for wsl -- version execution

Thank you,

image

WslLogs-2023-03-24_16-49-26.zip

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 24, 2023

Thank @AnthonyHayes72. Looking at the logs it's pretty clear that there's one registry key with an unexpected value that's confusing WSL.

Given that wsl --version is failing as well, I think it's probably HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion

Can you share a screenshot of that key ?

@AnthonyHayes72
Copy link
Author

Thank @AnthonyHayes72. Looking at the logs it's pretty clear that there's one registry key with an unexpected value that's confusing WSL.

Given that wsl --version is failing as well, I think it's probably HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion

Can you share a screenshot of that key ?

Here's the reg key - again thanks for your help...

image

@AnthonyHayes72
Copy link
Author

I have had my work pc updated to Windows 11 and everything is working now - thank you for your help @OneBlue

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 28, 2023

Ah too bad I was hoping to root cause the issue.

Glad the issue is resolved though. Closing.

@OneBlue OneBlue closed this as completed Mar 28, 2023
@d0zer11st
Copy link

I had the same issue. This is what helped me:

  1. Remove WSL from windows store.
  2. Install WSL2 Linux kernel update package for x64 machines from Step 4 in https://learn.microsoft.com/en-us/windows/wsl/install-manual

@benhillis
Copy link
Member

@d0zer11st
Copy link

seems like nothing has changed

PS C:\tools> wsl --version
WSL version: 1.1.7.0
Kernel version: 6.1.21.1-1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22000.1696

PS C:\tools> wsl --list
Invalid value for registry
Error code: Wsl/0x80040153

@OneBlue
Copy link
Collaborator

OneBlue commented Apr 5, 2023

@d0zer11st: Can you share /logs ?

@microsoft-github-policy-service
Copy link
Contributor

Hello! Could you please provide more logs to help us better diagnose your issue?

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 scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging

Thank you!

@d0zer11st
Copy link

@d0zer11st: Can you share /logs ?

Sure.

WslLogs-2023-04-05_20-40-30.zip

@farzadkb
Copy link

I have same issue
image
image

@luquilo
Copy link

luquilo commented Sep 14, 2023

i have the same issue, can you help me @OneBlue ? i dont really understand with these log (0x80040153)

seems like you really know how to root the cause of the issue😅

edited 2 days later = "nevermind, i choose to install ubuntu instead of wsl2, thanks btw
"

@nikolaikopernik
Copy link

Have the original issue with ACCESSDENIED when trying to install pre-release versions:

PS C:\Users\user> wsl --version
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19044.3324

PS C:\Users\user> wsl --update
Checking for updates.
The most recent version of Windows Subsystem for Linux is already installed.

PS C:\Users\user> wsl --update --pre-release
Checking for updates.
Updating Windows Subsystem for Linux to version: 2.0.0.
Access is denied.
Error code: Wsl/UpdatePackage/E_ACCESSDENIED

@OneBlue
Copy link
Collaborator

OneBlue commented Sep 20, 2023

Thank you for reporting this @nikolaikopernik. Can you share logs when you see this error ?

@nikolaikopernik
Copy link

Sure
WslLogs-2023-10-05_09-14-14.zip

@OneBlue
Copy link
Collaborator

OneBlue commented Oct 5, 2023

Sure WslLogs-2023-10-05_09-14-14.zip

Thank you @nikolaikopernik. Do you get the same result if you run the command in an elevated prompt ?

@nikolaikopernik
Copy link

nikolaikopernik commented Oct 5, 2023

Yes, ran it as an admin - same result

@OneBlue
Copy link
Collaborator

OneBlue commented Oct 5, 2023

Yes, ran it as an admin - same result

Interesting. Do you see the same issue if you manually download and install the latest build of WSL ?

@chetratep
Copy link

I am having the same issue. Tried with Administrator and also tried the latest build of WSL
2.0.4

PS C:\Users\user> wsl --update --pre-release
Checking for updates.
Updating Windows Subsystem for Linux to version: 2.0.4.
PS C:\Users\user>
PS C:\Users\user> wsl --install  -d Debian
Installing: Debian GNU/Linux
Access is denied.           0.0%                           ]
Error code: Wsl/InstallDistro/E_ACCESSDENIED

@nikolaikopernik
Copy link

@OneBlue
After installing the latest version from MSI, I don't have the issue of updating WSL (but honestly I cannot update it as it's the latest version atm). I will wait for another version to be released and will check it then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants