The solution for my problem (which was 'Cannot enable VirtualMachinePlatform' while trying to run troubleshooting steps for turning on docker desktop) was to uninstall hyperV in control panel ('turn windows features on or off') then reinstall it. then enable VirtualMachinePlatform. then docker desktop will work again.
Cannot enable VirtualMachinePlatform
PS C:\Users\admin> Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -All
Enable-WindowsOptionalFeature : One or several parent features are disabled so current feature can not be enabled.
At line:1 char:1
- Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlat ...
-
+ CategoryInfo : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand
I cannot enable VirtualMachinePlatform. I also tried the control panel but after I checked the box and click apply and ok, the box unchecked itself.
Windows for home | Windows 11 | Settings
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
12 answers
Sort by: Most helpful
-
Anonymous
2025-01-06T20:42:53+00:00 -
DYARI BARHAM 37,076 Reputation points Independent Advisor
2024-12-02T21:08:59+00:00 May I know what is your Windows edition?
Click Start > Type winver and hit enter > Screenshot it and post it back.
-
Anonymous
2024-12-02T20:02:01+00:00 Hi Dyari,
I have already enabled virtualization from BIOS, and installed all updates. When I tried enabling Hyper-V, I got this error.
PS C:\Users\admin> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Enable-WindowsOptionalFeature : Feature name Microsoft-Hyper-V is unknown.
At line:1 char:1
- Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V ...
-
+ CategoryInfo : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand
I also don't see Hyper-V when using control panel. If you are talking about Window Hypervisor Platform then I already have it enabled.
-
DYARI BARHAM 37,076 Reputation points Independent Advisor
2024-12-02T07:34:44+00:00 Hi QuangChrono,
I'm Dyari. Thanks for reaching out. I will be happy to assist you in this regard.
Please open Powershell as admin and run this command:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
After enabling Hyper-V, retry enabling VirtualMachinePlatform:
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -All
But it is important to make sure Hardware Virtualization, Virtualization Technology or (VT-x) or AMD-V is enabled from BIOS.
It is also best to install all pending Windows updates.
Please let me know if you need further assistance and keep me updated.