-
Notifications
You must be signed in to change notification settings - Fork 852
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
wsl mount vhd not working #8165
Comments
The |
my wsl is store version @benhillis
|
Same problem here. I´m getting access denied. Versão do WSL: 0.56.2.0 |
Hi @SquallATF , try this: If you mounted the disk in the past using wsl --mount, before installling the wsl preview from the store:
Does it show the same error? |
/logs |
Hello! Could you please provide more logs to help us better diagnose your issue? You can find instructions on how to attach logs here, please make sure to post the link to the Feedback Hub item in this chat so we can see it. Thank you! |
Just uploaded the logs with the feedback hub here: https://aka.ms/AAgbnmc I recorded it not working, and following these steps I described here #8165 (comment) it works, |
I have make a copy of the vhdx and mount successful. Then I tested create new vhd and vhdx, all of them can mount successful. I seem to have found the cause of the problem, if vhd/vhdx is created by Disk Management and did not detach from Disk Management, then run Some test, message is translated from Chinese
Feedback Hub logs https://aka.ms/AAgczv8 |
Yes, you can run |
vhdx is not show in that list |
Yes, the same happens here. Even if the disk is not mounted, we get the message |
I found the reason for wsl return access denied. if the vhd is created under the user profile directory , the vhd owner is After fix vhd acl, the vhd can be mounted successfully. |
I just checked th ACL on the vhdx files like you said. But my vhdx files always are created and kept outside user profile directory. I tried New-VHD and the Disk Manager for creating the files, both creates it with the same ACL. I wonder, isn´t the original ACL the correct way? Should we really changed it? For now, it works. |
Thanks for reporting this @SquallATF. Looking at the logs, WSL is getting access denied when trying to attach the disk to the VM, which shows that the ACL on the file don't allow full control the user. Closing since this is by-design (WSL can't bypass the filesystem ACL when mounting vhd's). |
Version
Microsoft Windows [Version 10.0.22000.556]
WSL Version
Kernel Version
5.10.102.1
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
wsl --mount --vhd workdata.vhdx
but if use
Mount-VHD
command, and mount with DiskPath will successful mount.Expected Behavior
mount vhd successful
Actual Behavior
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: