Failed to attach disk '\\192.168.1.123\ext4.vhdx' to WSL2: The user name or password is incorrect.
Nobody has claimed this yet.
- 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.19045.4598]
### WSL Version
2.0.14.0
### Are you using WSL 1 or WSL 2?
- [X] WSL 2
- [ ] WSL 1
### Kernel Version
5.15.133.1-1
### Distro Version
clearlinux
### Other Software
_No response_
### Repro Steps
I have a network shared drive mapped.
In PowerShell (administrator mode)
I have ran this command successfully:
wsl --import-in-place my_distro_name "\\path_to_my_NAS_share_directory\ext4.vhdx"
and it imports just fine.
then when I run
wsl -d my_distro_name
I get the following error:
Failed to attach disk '\path_to_my_NAS_share_directory\ext4.vhdx' to WSL2: The user name or password is incorrect.
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/0x8007052e
I don't know where to look for setting the credentials for WSL to be able to access the NAS directory location. Any direction or help would be greatly appreciated.
### Expected Behavior
To actually start the distribution.
### Actual Behavior
getting the error message
Failed to attach disk '\path_to_my_NAS_share_directory\ext4.vhdx' to WSL2: The user name or password is incorrect.
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/0x8007052e
### Diagnostic Logs
[WslLogs-2024-07-03_18-30-20.zip](https://github.com/user-attachments/files/16092250/WslLogs-2024-07-03_18-30-20.zip)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PowerShell reproduction using wsl --import-in-place and wsl -d against the network-shared VHDX, then review the attached WSL diagnostic logs. Trace the difference between importing the disk and attaching it at distribution startup. Done means the distribution starts from the UNC VHDX path without the credential error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100