我在使用 Window Server 安装 Docker 时遇到了一些问题。
环境 list :
1 Windows 10 (Physical Machine)
2.VMware® Workstation Player (12~ above) URL
3.Windows Server 2016 at the VM
4.Docker CE for Windows(stable) URL
Unable to start: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: 'MobyLinuxVM' failed to start.
Failed to start the virtual machine 'MobyLinuxVM' because one of the Hyper-V components is not running.
'MobyLinuxVM' failed to start. (Virtual machine ID BBD755F7-05B6-4933-B1E0-F8ACA3D2467B)
The Virtual Machine Management Service failed to start the virtual machine 'MobyLinuxVM' because one of the Hyper-V components is not running (Virtual machine ID BBD755F7-05B6-4933-B1E0-F8ACA3D2467B).
at Start-MobyLinuxVM, <No file>: line 315
at <ScriptBlock>, <No file>: line 410
at Docker.Backend.ContainerEngine.Linux.DoStart(Settings settings, String daemonOptions) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\ContainerEngine\Linux.cs:line 256
at Docker.Backend.ContainerEngine.Linux.Start(Settings settings, String daemonOptions) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\ContainerEngine\Linux.cs:line 130
at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass9_0.<Register>b__0(Object[] parameters) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeServer.cs:line 47
at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeServer.cs:line 145
如何解决这个问题,谢谢。
最佳答案
如果您在安装了 Docker 并且已经是 Nested Virtualization capable VM 的 Azure Windows 10 VM 上遇到此错误,这是一个解决方案换句话说,您的 Azure VM 必须是 V3
sized最低限度( DV3 或 EV3 ):
- Ensure Windows Hyper-V featutes are enabled by running PowerShell cmdlet:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -Verbose
- Ensure Windows Containers feature is enabled by running PowerShell cmdlet:
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All -Verbose
- Ensure Hypervisor is set to auto start in the Boot Configuration Database (BCD) by running in elevated command prompt the command:
bcdedit /set hypervisorlaunchtype Auto
运行上述所有操作并重新启动 Azure VM 后,Docker 应该可以正常启动。
In addition to the Answer above the PowerShell cmdlet to set the Virtual Machine Setting is:
Set-VMProcessor -VMName <Enter-VM-Name> -ExposeVirtualizationExtensions $true -Verbose
Still have an issue and haven't rebooted yet?! - just restart the windows services by running the following:
net stop vmms
net start vmms
关于docker - 由于 Hyper-V 组件之一未运行,无法启动虚拟机 'MobyLinuxVM',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48255871/