
在启动 Docker Desktop 时可能会遇到以下提示Docker Desktop - Virtual Machine Platform not enabled Virtual Machine Platform not enabled该错误通常是由于 Windows 未启用 “Virtual Machine Platform” 功能导致的这是运行 Docker Desktop特别是基于 WSL 2 的后端所必需的组件。使用 PowerShell 命令启用 Virtual Machine Platform 并重启计算机。可以通过DISM或Enable-WindowsOptionalFeature命令来启用 Virtual Machine Platform。解决方案 1使用 DISM 命令以管理员身份运行 PowerShell执行以下命令启用 Virtual Machine Platformdism.exe/online/enable-feature/featurename:VirtualMachinePlatform/all/norestart解决方案2使用 PowerShell Enable-WindowsOptionalFeature 命令同样以管理员身份运行 PowerShell执行以下命令Enable-WindowsOptionalFeature-Online-FeatureName VirtualMachinePlatform-All-NoRestart重启计算机以应用更改Restart-Computer重启计算机后再次启动 Docker Desktop错误提示应消失。如果仍然遇到问题检查 BIOS 设置是否已启用虚拟化技术VT-x 或 AMD-V。启用 Virtual Machine Platform 是运行 Docker Desktop 的前提条件之一。可以使用DISM或Enable-WindowsOptionalFeature命令来快速启用该功能确保在 BIOS 里启用了虚拟化技术并在操作完成后重启计算机以应用更改。