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

Failed to attach disk #10858

Closed
1 of 2 tasks
Heng-Zhou opened this issue Dec 1, 2023 · 1 comment
Closed
1 of 2 tasks

Failed to attach disk #10858

Heng-Zhou opened this issue Dec 1, 2023 · 1 comment

Comments

@Heng-Zhou
Copy link

Heng-Zhou commented Dec 1, 2023

Windows Version

22H2 (OS Build 19045.3693)

WSL Version

WSL version: 2.0.9.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3693

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

Default Distribution: Ubuntu
Default Version: 2

Distro Version

Can't enter wsl. A default installation of Ubuntu, I think it is 22.04

Other Software

No response

Repro Steps

I install wsl using command "wsl --install" in cmd run as Administrator. After I'm back to command line, I reboot the machine. Then when I'm back to Windows 10, wsl continues to install, then error:

Ubuntu is already installed.
Launching Ubuntu...
Failed to attach disk 'C:\Users\Admin\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_FILE_NOT_FOUND
Failed to attach disk 'C:\Users\Admin\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_FILE_NOT_FOUND
Failed to attach disk 'C:\Users\Admin\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_FILE_NOT_FOUND
Press any key to continue...

This is the screenshot:
image

If I run wsl within cmd, I got similar errors:

C:\Users\Admin>wsl
Failed to attach disk 'C:\Users\Admin\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_FILE_NOT_FOUND

Screenshot:
image

Expected Behavior

Run without error.

Actual Behavior

I install wsl using command "wsl --install" in cmd run as Administrator. After I'm back to command line, I reboot the machine. Then when I'm back to Windows 10, wsl continues to install, then error:

Ubuntu is already installed.
Launching Ubuntu...
Failed to attach disk 'C:\Users\Admin\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_FILE_NOT_FOUND
Failed to attach disk 'C:\Users\Admin\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_FILE_NOT_FOUND
Failed to attach disk 'C:\Users\Admin\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_FILE_NOT_FOUND
Press any key to continue...

This is the screenshot:
image

If I run wsl within cmd, I got similar errors:

C:\Users\Admin>wsl
Failed to attach disk 'C:\Users\Admin\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_FILE_NOT_FOUND

Screenshot:
image

Diagnostic Logs

WslLogs-2023-11-30_19-42-10.zip

@OneBlue
Copy link
Collaborator

OneBlue commented Dec 1, 2023

Thank you for reporting this @Heng-Zhou. Looking at the output it looks like the distribution disk is missing.

Unfortunately the only solution would be to unregister the distribution and then install it again (wsl --unregister ubuntu && wsl --install -d ubuntu)

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

No branches or pull requests

2 participants