Docker Desktop 4.37.1: Installation Failed

When launched Docker Desktop this morning I was greeted with an error message prompting me to run this command “Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform” in PowerShell as an administrator. This failed with this spectacular mess:

Enable-WindowsOptionalFeature : Class not registered
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlat ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

But, I’d noticed there was an update to Docker Desktop, so I thought I’d try to install that, and see if it solves my problem, but when running the Docker Desktop installer for version 4.37.1, I’m given this error:

Installation Failed

Component Docker.Installer.EnableFeaturesAction failed: 
   at Docker.Installer.InstallWorkflow.<DoHandleD4WPackageAsync>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Installer.InstallWorkflow.<DoProcessAsync>d__23.MoveNext()

If anyone has any idea what the cause of this unexpected behavior is, I’d really appreciate some advice. Docker Desktop has worked great since I installed it months ago, and I’ve only recently experienced any issues. Also, I haven’t installed any updates to Windows for a few days, so that can’t be the cause, as I was using Docker Desktop with no issues just yesterday. Windows version is: 23H2

VirtualMachinePlatform is required by Docker Desktop. If you can’t enable it on Windows, another Docker Desktop version will not be able to solve it. What is your Windows version?

My Windows version is 23H2. I was successfully running Docker Desktop as of Jan 16 (the day before my original post), then Docker Desktop inexplicably stopped working.

You are not the first saying Docker Desktop just stopped working without any change, but I believe you are the first showing that even PowerShell comands to enable Windows features fail.

Docker Desktop can use the WSL2 backend or HyperV backend. WSL2 requires VirtualMachinePlatform so if you choose WSL2, Docker Desktop requires that feature as well. If it is not available on Windows, Docker Desktop will not work

https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-3—enable-virtual-machine-feature

i don’t know what can cause this error, but you can find issues like this:

Does the following command work?

Get-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

If not, try to use a different PowerShell version or click the link I shared to Microsoft’s documentation where they recommend a command that I think should work in cmd.

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Windows 11?

Get-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

Hangs for a bit when run, but returns absolutely nothing. I tried it on Windows PowerShell (as admin) and PowerShell 7.4.6 (as admin as well). When it run it on Windows Powershell, I get about 115 lines added to my dism.log file including these errors:

2025-01-19 10:52:59, Error                 DISM   DISM Package Manager: PID=4624 TID=24992 Failed to create a CBS package identity. - CDISMPackageManager::Internal_CreatePackageByName(hr:0x80040154)
2025-01-19 10:52:59, Error                 DISM   DISM Package Manager: PID=4624 TID=24992 Failed to get the underlying CBS package. - CDISMPackageManager::OpenPackageByName(hr:0x80040154)
2025-01-19 10:52:59, Error                 DISM   DISM Package Manager: PID=4624 TID=24992 Failed to open the Foundation package. - CDISMPackageManager::OpenFoundationPackage(hr:0x80040154)
2025-01-19 10:52:59, Error                 DISM   API: PID=31520 TID=28840 Failed to open package - CGetFeatureInfoCommandObject::InternalExecute(hr:0x80040154)
2025-01-19 10:52:59, Error                 DISM   API: PID=31520 TID=28840 InternalExecute failed - CBaseCommandObject::Execute(hr:0x80040154)
2025-01-19 10:52:59, Error                 DISM   API: PID=31520 TID=15080 CGetFeatureInfoCommandObject internal execution failed - DismGetFeatureInfoInternal(hr:0x80040154)

When I run the analogous command in Command Prompt, it fails with the error message:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Error: 0x80040154
Class not registered

However, I believe the feature must be enabled and working properly because I have WSL 2 installed and working! Here is my version info:

WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.22631.4602

Here is some more specific information on my Windows version if that is helpful:

Edition	Windows 11 Home
Version	23H2
Installed on	‎12/‎17/‎2022
OS build	22631.4602
Experience	Windows Feature Experience Pack 1000.22700.1055.0

I will try resetting Windows and see if that magically fixes these issues.

I did the sensible thing and reinstalled Windows rather than trying to fix whatever was wrong with it. Turns out its faster to reinstall all of the relevant programs on my PC than it is to decipher these error messages. Thank you for the help though!