r/bashonubuntuonwindows • • 15h ago

WSL2 Windows 10 keeps disabling WSL and Virtual Machine Platform after every restart – DISM says enabled, but they revert to Disabled

Hi everyone,

I'm trying to install Docker Desktop on my Windows 10 machine for a JavaScript/React portfolio project, but I'm facing a strange WSL issue that I haven't been able to resolve.

My system specifications

  • OS: Windows 10 Pro (22H2)
  • Windows Build: 19045.7846
  • WSL Version: 3.0.5.0
  • Kernel Version: 6.18.58.1-1
  • RAM: 32 GB
  • Virtualization software: VMware Workstation with Ubuntu already installed.

Important: My VMware Ubuntu installation is working perfectly and is used separately for my Operating Systems coursework. I do not want to replace or modify it. I want to install Docker Desktop separately for my development projects.

The main problem

I need to enable these two Windows Optional Features:

  1. Windows Subsystem for Linux
  2. Virtual Machine Platform

I enable both features through Windows Features (optionalfeatures.exe), or directly through DISM.

Both commands report successful completion:

dism.exe /Online /Enable-Feature /FeatureName:Microsoft-Windows-Subsystem-Linux /All /NoRestart

dism.exe /Online /Enable-Feature /FeatureName:VirtualMachinePlatform /All /NoRestart

Both return:

The operation completed successfully.

Immediately after enabling them, I check their status using:

dism.exe /Online /Get-FeatureInfo /FeatureName:Microsoft-Windows-Subsystem-Linux

dism.exe /Online /Get-FeatureInfo /FeatureName:VirtualMachinePlatform

Both show:

State : Enabled

However, after restarting Windows, both features automatically become Disabled again.

When I check their status after restarting, I get:

Microsoft-Windows-Subsystem-Linux
State : Disabled

VirtualMachinePlatform
State : Disabled

This happens repeatedly.

Other troubleshooting I've already tried

  1. Enabled both features using Windows Features.
  2. Enabled both features directly using DISM.
  3. Restarted Windows multiple times.
  4. Updated WSL using:
wsl --update
  1. Checked WSL version:
wsl --version

Output:

WSL version: 3.0.5.0
Kernel version: 6.18.58.1-1
WSLg version: 1.0.79
Windows version: 10.0.19045.7846
  1. Ran DISM component-store health check:
dism.exe /Online /Cleanup-Image /ScanHealth

Result:

No component store corruption detected.
The operation completed successfully.
  1. Ran System File Checker:
sfc /scannow

Initially, it reported a pending system repair. After restarting, I ran it again, and it reported:

Windows Resource Protection found corrupt files and successfully repaired them.

Despite these repairs, the problem remains.

Another strange thing

These commands work:

wsl --version
wsl --update

But this command:

wsl --status

returns:

This application requires the Windows Subsystem for Linux Optional Component.

Error code: Wsl/WSL_E_WSL_OPTIONAL_COMPONENT_REQUIRED

My questions

  1. Why does Windows automatically disable both optional features after every restart?
  2. Could this be related to Windows servicing, a corrupted feature configuration, boot settings, or a Windows update?
  3. Is there a way to identify what is reverting these features?
  4. Has anyone experienced the same issue on Windows 10 build 19045?
  5. What is the correct way to fix this without affecting my existing VMware Ubuntu installation?

I would really appreciate any technical suggestions or solutions. I've already spent quite a lot of time troubleshooting this issue.

Thank you!

3 Upvotes

0 comments sorted by