r/bashonubuntuonwindows • u/umairkaleem • 3h 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:
- Windows Subsystem for Linux
- 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 /NoRestartBoth 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:VirtualMachinePlatformBoth show:
State : EnabledHowever, 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 : DisabledThis happens repeatedly.
Other troubleshooting I've already tried
- Enabled both features using Windows Features.
- Enabled both features directly using DISM.
- Restarted Windows multiple times.
- Updated WSL using:
wsl --update- Checked WSL version:
wsl --versionOutput:
WSL version: 3.0.5.0
Kernel version: 6.18.58.1-1
WSLg version: 1.0.79
Windows version: 10.0.19045.7846- Ran DISM component-store health check:
dism.exe /Online /Cleanup-Image /ScanHealthResult:
No component store corruption detected.
The operation completed successfully.- Ran System File Checker:
sfc /scannowInitially, 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 --updateBut this command:
wsl --statusreturns:
This application requires the Windows Subsystem for Linux Optional Component.
Error code: Wsl/WSL_E_WSL_OPTIONAL_COMPONENT_REQUIREDMy questions
- Why does Windows automatically disable both optional features after every restart?
- Could this be related to Windows servicing, a corrupted feature configuration, boot settings, or a Windows update?
- Is there a way to identify what is reverting these features?
- Has anyone experienced the same issue on Windows 10 build 19045?
- 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!



