Step 1: Enable Virtual Machine Platform via PowerShell
- Open PowerShell as an Administrator.
- Press
Win + X
and select Windows PowerShell (Admin) or Terminal (Admin) if you’re using Windows Terminal.
- Press
- Run the following command to enable the Virtual Machine Platform:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- Also, enable the Windows Subsystem for Linux (WSL) feature, which Docker often uses:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- After both features are enabled, restart your computer for the changes to take effect:
Restart-Computer
Step 2: Verify Virtual Machine Platform is Enabled
After restarting your computer:
- Open PowerShell again (with administrative privileges) and check if the Virtual Machine Platform is enabled by running:
Get-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
It should show that the feature is enabled.
- You can also verify that WSL is enabled with:
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Step 3: Start Docker Desktop
Once you’ve enabled both features and restarted your system, open Docker Desktop. It should now run without the “Virtual Machine Platform not enabled” error.