Skip to content

Cannot start WSL: Wsl/Service/CreateInstance/CreateVm/MountVhd/HCS/ERROR_FILE_NOT_FOUND #40488

@Hai-Ren

Description

@Hai-Ren

Solution

  1. Download the installer from https://github.com/microsoft/WSL/releases/download/2.7.3/wsl.2.7.3.0.x64.msi
  2. Right click on the installer -> show more options -> repair
Image

Roll back also works but is not required


Windows Version

Microsoft Windows [Version 10.0.26200.8246]

WSL Version

2.7.3.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

6.6.114.1-1

Distro Version

Ubuntu 22.04

Other Software

  • Visual Studio Code 1.109.2 with WSL extension
  • CERN ROOT (C++ Data Analysis Framework), version 6.26
  • WSLg (GUI support for WSL)

Repro Steps

The issue started after an abrupt crash, and now the broken state is permanent for any WSL2 operation.

  1. I was running a C++ plotting task using CERN ROOT inside WSL2 (Ubuntu 22.04) via VS Code Remote.
  2. The ROOT drawing failed to render, ROOT exited unexpectedly, and VS Code immediately lost connection to WSL.
  3. I opened a new Windows PowerShell and ran wsl. It failed with Wsl/Service/CreateInstance/CreateVm/HCS/ERROR_FILE_NOT_FOUND
  4. I rebooted the Windows host machine completely and ran wsl again. The same error persists.
  5. Attempted to bypass the broken distro by installing a brand new WSL2 instance: wsl --install -d Ubuntu-24.04. This ALSO fails with the exact same HCS error.
  6. Switched default version to WSL1 (wsl --set-default-version 1) and ran the install command again. The installation SUCCEEDED and WSL1 works perfectly.

Troubleshooting steps I have already taken (None of these worked for WSL2):

  • Verified the VHDX file exists, is on an NTFS drive, and the folder is NOT compressed.
  • Checked diskpart and verified the original ext4.vhdx file is not corrupted.
  • Unregistered the old distro and tried wsl --import-in-place.
  • Completely cleared old configurations by deleting the registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss.
  • Windows Settings -> System Components -> Windows Subsystem for Linux -> Advanced options -> Repair & Reset.
  • Turned off "Virtual Machine Platform", "Hyper-V" (via script for Home Edition), and "Windows Subsystem for Linux" in Windows Features, rebooted, turned them back on, and rebooted.
  • Ran sfc /scannow and DISM /Online /Cleanup-Image /RestoreHealth.

Expected Behavior

After a crash or a host machine reboot, WSL2 should be able to restart normally. Even if the specific distro's VHDX was locked or corrupted, I should be able to create and install a brand new WSL2 instance (e.g., Ubuntu-24.04) without the Host Compute Service (HCS) blocking the VM creation.

Actual Behavior

WSL2 is permanently broken on the host machine. Any attempt to start an existing WSL2 instance or install a new one results in the following HCS error. Only WSL1 is functional.

Terminal output when trying to start WSL:
The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/CreateVm/HCS/ERROR_FILE_NOT_FOUND

Terminal output when trying to install a new WSL2 distro:
Installing, this may take a few minutes...
The system cannot find the file specified.
Error code: Wsl/InstallDistro/Service/RegisterDistro/CreateVm/HCS/ERROR_FILE_NOT_FOUND

Diagnostic Logs

WslLogs-2026-05-11_05-53-27.tar.gz

Metadata

Metadata

Assignees

No one assigned

    Labels

    installFailure to install

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions