Skip to content

Updating WSL broke the installation #11013

@hhalaby

Description

@hhalaby

Windows Version

Microsoft Windows [Version 10.0.22631.3007]

WSL Version

2.0.14.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-1

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

I am not sure that these steps will reproduce the error as I can't test it anymore

  • Ran wsl.exe --update from PowerShell. I had temporary admin rights when I ran this command
  • Run WSL after update, some errors reported on terminal but things were running correctly and errors no longer produced in subsequent terminals. (did not bother to log these errors unfortunately)
  • Restart computer with admin rights disabled.
  • WSL does not start

Expected Behavior

WSL starts correctly after update

Actual Behavior

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

I checked the registry for this key:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss and the versions there are older than the ones I get in the terminal using wsl.exe --version .
Registry vs Terminal Versions:

(Default)               REG_SZ      (value not set)
GraphicsVersion         REG_SZ      1.0.27          ==> 1.0.59 (terminal)
KernelVersion           REG_SZ      5.10.102.1      ==> 5.15.133.1-1 (terminal)
NatGatewaylpAddress     REG_SZ      192.168.48.1
NatNetwork              REG_SZ      192.168.48.0/20
RollbackKernelVersion   REG_SZ      5.10.16
SystemDistro            REG_SZ      C:\ProgramData\Microsoft\WSL\system.vhd
VirtioFsClassld         REG_SZ      {DF380B4F-9282-46B6-AAAB-E94BDD7EC5BB}

Copying the file system.vhd from C:\ProgramData\Microsoft\WSL\system.vhd to C:\Program Files\WSL\system.vhd allows WSL to start again normally but I feel like this is a really dirty solution and I don't know what will happen when I update again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions