Launching WSL and getting "Catastrophic failure" with error code Wsl/Service/CreateInstance/CreateVm/HCS/E_UNEXPECTED? The name is worse than the problem. Here is what it actually means and how to work through it.
The Error
Catastrophic failure
Error code: Wsl/Service/CreateInstance/CreateVm/HCS/E_UNEXPECTED
Read the error path from left to right, because it narrows things down considerably:
Wsl/Service- the WSL service was asked to do somethingCreateInstance- specifically, to start a distributionCreateVm- which required creating the underlying virtual machineHCS- handled by the Host Compute ServiceE_UNEXPECTED- a generic COM failure code meaning "something went wrong that I have no better name for"
The important part is that the failure happens at CreateVm - before your Linux distribution begins to boot. Your files, your packages and your distribution's state are not implicated. The problem is on the Windows virtualization side.
Quick Fix
From PowerShell:
wsl --shutdown
Wait ten seconds, then start WSL again. This is safe to run at any point and clears a surprising share of transient cases, especially after the host has resumed from sleep.
If that does not work, go through the fixes below in order - they are ordered by how often each turns out to be the cause.
Fix 1: Check .wslconfig for Invalid Values
This is the most common cause of E_UNEXPECTED specifically. WSL reads %USERPROFILE%\.wslconfig when it creates the virtual machine, and a malformed value stops creation dead.
Test it by renaming the file rather than deleting it. In Command Prompt:
ren %USERPROFILE%\.wslconfig .wslconfig.bak
Then:
wsl --shutdown
wsl
If WSL starts, the file was the problem. Open the backup and look for:
- A
memoryvalue larger than the RAM the host actually has, or larger than Windows will surrender - Units written incorrectly - it must be
8GBor8192MB, not8 GB,8gor8 - A
processorsvalue exceeding your logical CPU count - Smart quotes or a BOM introduced by pasting from a web page into Notepad
- A setting placed outside the
[wsl2]section header
A known-good minimal file looks like this:
[wsl2]
memory=8GB
processors=4
swap=2GB
Reintroduce settings one at a time and run wsl --shutdown between each so you know which one breaks it.
Fix 2: Restart the Host Compute Service
The HCS in the error path is the Hyper-V Host Compute Service. If it has wedged, WSL cannot create a virtual machine. In an elevated PowerShell:
wsl --shutdown
Restart-Service vmcompute
wsl
If the service will not start, check its state and its dependencies:
Get-Service vmcompute, LxssManager, HvHost | Format-Table Name, Status, StartType
All three should be able to start. LxssManager is the WSL service itself; HvHost is the Hyper-V host service.
Fix 3: Confirm the Virtualization Features Are Enabled
WSL 2 needs two Windows optional features. In an elevated PowerShell:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Then reboot. Skipping the reboot is a common reason people conclude this fix "did not work".
Also confirm the hypervisor is set to launch at boot:
bcdedit /enum | Select-String hypervisorlaunchtype
If it reports Off, turn it back on and reboot:
bcdedit /set hypervisorlaunchtype auto
Off is not a default - something set it, usually an older debugging session, an anti-cheat installer, or a guide about improving game performance. Turning it back on restores WSL 2, Windows Sandbox and Hyper-V together.
Finally, check the firmware level. Open Task Manager, go to Performance > CPU, and look for Virtualization. If it reads Disabled, enable Intel VT-x or AMD-V (often labelled SVM Mode) in your BIOS or UEFI setup.
Fix 4: Update WSL
Several E_UNEXPECTED conditions have been fixed in WSL releases, particularly around interactions with Windows feature updates.
wsl --update
wsl --shutdown
If the update is blocked because the Microsoft Store is unavailable on a managed machine:
wsl --update --web-download
Confirm what you ended up with:
wsl --version
Fix 5: Check for a Conflicting Hypervisor
Older releases of VirtualBox and VMware Workstation claimed exclusive use of the CPU's virtualization extensions, which left nothing for the Windows hypervisor and broke WSL 2. Current versions - VirtualBox 7.x and VMware Workstation 17 - run on top of the Windows hypervisor platform and coexist without trouble.
If you are on an older release, updating is the fix. Uninstalling is not necessary and rarely the real solution.
Last Resort: Re-register the Distribution
Only if everything above has failed and you suspect the distribution's virtual disk is corrupt.
Back it up first. wsl --unregister permanently deletes the distribution's entire filesystem, and there is no undo:
wsl --export Ubuntu C:\backup\ubuntu.tar
Then:
wsl --unregister Ubuntu
wsl --import Ubuntu C:\wsl\Ubuntu C:\backup\ubuntu.tar
After an import, the distribution starts as root rather than your normal user. Set the default back:
ubuntu config --default-user yourusername
Verify the Fix
# WSL version and kernel
wsl --version
# Installed distributions and their state
wsl -l -v
Expected output from wsl -l -v:
NAME STATE VERSION
* Ubuntu Running 2
Then confirm the distribution actually works:
wsl -- uname -a
Prevention
- Treat
%USERPROFILE%\.wslconfigas code: change one setting at a time, and keep a known-good copy alongside it. - Leave headroom in the
memoryvalue. Allocating nearly all of the host's RAM to WSL is the setting most likely to produce a failure to create the virtual machine. - Run
wsl --updateperiodically, and again after any Windows feature update. - Prefer
wsl --shutdownover killing processes when WSL misbehaves; it releases the virtual machine cleanly. - Keep an export of any distribution you have invested configuration in.
wsl --exporttakes a minute and makes the destructive fix survivable.
Summary
- First:
wsl --shutdown, then start WSL again - Most likely cause: rename
%USERPROFILE%\.wslconfigand retest - Service:
Restart-Service vmcomputefrom an elevated prompt - Features: enable
VirtualMachinePlatform, confirmhypervisorlaunchtype auto, reboot - Update:
wsl --update - Only with a backup:
wsl --exportbefore anywsl --unregister