Access denied for wsl --import
Windows Version
Microsoft Windows [version 10.0.19045.5854]
WSL Version
2.4.13.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
I'm trying to import an Ubuntu image to install it on a external drive to save space on my SSD:
wsl --import Ubuntu D:\WSL\Ubuntu D:\ubuntu-backup.tar
Expected Behavior
I'm expecting it to work
Actual Behavior
I got an access denied error, I tried to run PowerShell as administrator mode but it didn't work:
Access denied. Error code: Wsl/Service/RegisterDistro/E_ACCESSDENIED
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'.
This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-file it as a new issue.
Thank you!