The virtual disk ("userdata.2.vhdx") of the Windows Subsystem for Android is damaged, which caused WSA startup failure.

HigFerm 20 Reputation points
2024-01-11T11:19:33.7433333+00:00

Problems I once tried to copy a large amount of files from the subsystem to Windows by using adb command:

.\adb connect 127.0.0.1:58526
.\adb pull /sdcard/… C:\…

However, for some unknown reasons, the progress is stuck at a certain value, so I close the terminal window. But then i found that i cannot open the subsystem anymore. I tried to open some apps and the Amazon app store. Each time the subsystem was launched, the launching window would last for a time, and then it closed itself and opened an identical one. This thing repeated about three or four times and finally stopped.

When i open the task manager to monitor the whole progress, i find that each time when the window was closed, the progress vemmemWSA would reboot. And when the window was closed for the last time, it ended.

Developers Mode is still can be used:

User's image

I thought there was something wrong with the vdisk, because when i tried to used the Repair function, it didn't fix it. I copyed the userdata.2.vhdx and Reset wsa. it worked.but when i used the old vdisk file to covered the new one, the same problem appeared again.

---There is some important data in the vdisk. Are there any ways to fix the problem? If not, can the vdisk be opened without wsa? Thanks! 🫶

---Additional Information

  1. The apps in wsa showed that the wsa storage space was only about 125 gb. (However, my computer has about 500 GB of space left.) When i used the pull command, thereonly a few dozen kilobytes of space remained.
  2. I once tried to use diskpart to extend userdata.2.vhdx:
diskpart
sel vdisk file=C:\Users\[username]\AppData\Local\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache\userdata.2.vhdx
expand vdisk maximum=[...]

However, (though the "Compress contents to save disk space" and "Encrypt contents to secure data" checkboxes are unselected), it cannot work and an error was reported: "The requested operation could not be completed due to a virtual disk system limitation. Virtual hard disk files must be uncompressed and unencrypted and must not be sparse."

  1. attach vdiskcommand cannot be used for the same reason. When mounting the vdisk in the Disk Manager, an error occurs indicating that the disk is not initialized.

---1. Windows Event Logs: when the wsa is opened, Application Error:

Application
Application Error
ID:1000

Windows Error Reporting:

Application
Windows Error Reporting
ID:1001
MoBEX
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-01-18T05:19:12.0133333+00:00

    Hi HigFerm,

    Hope you're doing well.

    Based on your description, it seems that the virtual disk ("userdata.2.vhdx") of the Windows Subsystem for Android is damaged, which caused WSA startup failure. You mentioned that you tried to use the Repair function, but it didn't fix the issue. You can try the following steps to repair the damaged virtual disk:

    1. Copy "userdata.2.vhdx" and mount it as a data disk on the diskmanagement. Open cmd as an administrator on the virtual machine and run the following command: chkdsk d: /f
    2. If the above method does not work, you can try to use some third-party software to recover the data.

    I hope this helps.

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.