microsoft / microsoft/WSL

Failed to attach disk 'LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified.

Open
#10,032 63 comments 18 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

file system
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.22621.1555]

WSL Version

1.2.5.0

Are you using WSL 1 or WSL 2?
  • WSL 2
  • WSL 1
Kernel Version

Linux version 5.15.90.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Jan 27 02:56:13 UTC 2023

Distro Version

Kali linux

Other Software

No response

Repro Steps
  1. uninstall the old kali linux
  2. reinstall kali linux from ms store.
Expected Behavior

The Kali linux installed successfully.

Actual Behavior

Could not open/start it when installed finished.

Diagnostic Logs
Failed to attach disk 'C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/MountVhd/ERROR_FILE_NOT_FOUND
Press any key to continue...
C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg>du -v

DU v1.62 - Directory disk usage reporter
Copyright (C) 2005-2018 Mark Russinovich
Sysinternals - www.sysinternals.com

           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\AC\INetCache
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\AC\INetCookies
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\AC\INetHistory
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\AC\Temp
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\AC
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\AppData
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalCache\Local\Microsoft
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalCache\Local
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalCache\Roaming\Microsoft\Windows\Start Menu\Programs
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalCache\Roaming\Microsoft\Windows\Start Menu
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalCache\Roaming\Microsoft\Windows
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalCache\Roaming\Microsoft
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalCache\Roaming
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalCache
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalState
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\RoamingState
           8  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\Settings
          32  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\SystemAppData\Helium
          32  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\SystemAppData
           0  C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\TempState

Totals:
Files:        8
Directories:  21
Size:         40,960 bytes
Size on disk: 135,168 bytes


C:\Users\Liu.D.H\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names no source file, test, or implementation entry point. Start by reviewing the WSL2 repro steps and the MountVhd/ERROR_FILE_NOT_FOUND diagnostic, then investigate the reinstall path for Kali Linux. Done would require a reproducible cause and a clearly scoped fix or test, neither of which is specified here.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.