microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.37k stars 816 forks source link

Error code: Wsl/Service/AttachDisk/E_INVALIDARG #11317

Closed HadiSDev closed 6 months ago

HadiSDev commented 7 months ago

Windows Version

Microsoft Windows [Version 10.0.23620.1000]

WSL Version

WSL version: 2.1.4.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.146.1-2

Distro Version

No response

Other Software

No response

Repro Steps

Try to attach a vhdx file with mount command: wsl --mount I:\WSLDistro.vhdx

Expected Behavior

Should just attach the disk file with no issue

Actual Behavior

The parameter is incorrect. Error code: Wsl/Service/AttachDisk/E_INVALIDARG

Diagnostic Logs

No response

github-actions[bot] commented 7 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

OneBlue commented 7 months ago

/logs

HadiSDev commented 7 months ago

WslLogs-2024-03-22_11-51-49.zip

OneBlue commented 7 months ago

Thank you @HadiSDev. Looks like you're trying to mount a vhd file.

Does this work for you ?

wsl --mount I:\WSLDistro.vhdx --vhd
HadiSDev commented 7 months ago

Thank you @HadiSDev. Looks like you're trying to mount a vhd file.

Does this work for you ?

wsl --mount I:\WSLDistro.vhdx --vhd

I get this now: Failed to attach disk '\?\I:\WSLDistro.vhdx' to WSL2: Access is denied. Error code: Wsl/Service/AttachDisk/MountVhd/HCS/E_ACCESSDENIED

OneBlue commented 7 months ago

Does your user account have permission to edit this file ? You can also try as administrator.

microsoft-github-policy-service[bot] commented 6 months ago

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!