WSL: Auto Update to WSL version 2.4.12.0 deletes the system.vdh and breaks the WSL.

Windows Version

Microsoft Windows [Version 10.0.22631.4751]

WSL Version

2.4.12.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.167.4-1

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

  1. Auto Update to wsl version 2.4.12.0 via wsl.exe --update
  2. Check the version installed it should be something like below
WSL version: 2.4.12.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5716
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.22631.4751

Expected Behavior

After a system restart, WSL should start normally without any data loss or corruption.

Actual Behavior

saw the following message after the system restart

Failed to attach disk 'C:\Program Files\WSL\system.vhd' to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/CreateVm/MountVhd/HCS/ERROR_FILE_NOT_FOUND

[process exited with code 4294967295 (0xffffffff)]
You can now close this terminal with Ctrl+D, or press Enter to restart.

Diagnostic Logs

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 18
  • Comments: 34

Most upvoted comments

i think this just happened to me too on my work laptop.

a random restart and then got the same error. same WSL version, same day.

That reminds me I also got a random restart as well. On my desktop. Weird.

i think this just happened to me too on my work laptop.

a random restart and then got the same error. same WSL version, same day.

I have the same issue. Rollback to previous version seems to work

How did you perform the rollback?

Download from below:

https://github.com/microsoft/WSL/releases/tag/2.4.11

~Anybody get this fixed without admin privileges? This happened this morning to my system and completely bricked my WSL.~

Edit: Found a fix! I don’t know if it’s standard for all WSL installations but I had an app called “WSL Settings” available. In there, go to Developer tab and select the extracted system.vhd as described here: https://github.com/microsoft/WSL/issues/11069#issuecomment-2719703464

This file can exist anywhere so no administrative permissions needed

I solved it by installing version 2.4.11 via msi file. No data lost

There is a fix that seems to work here:

#11069 (comment)

I can also confirm that this fixes it, but wow, what a whopper of a bug (and a fun way to start the morning).