我在使用Window Server安装Docker时遇到了一些问题。 环境清单:
1 Windows 10(物理机) 2.VMware®WorkstationPlayer(12~以上)URL 3.Windows Server 2016的VM 4.Docker CE for Windows(稳定)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
我该如何解决这个问题呢,谢谢。
如果这有助于其他人解决此问题,我发现从管理命令提示符运行这些命令修复了我的Hyper-V问题:
net stop vmms
net start vmms
然后,我能够毫无问题地启动我的docker容器。
如果您在已安装Docker的Azure Windows 10 VM上收到此错误,则可以使用以下解决方案:
- 确保通过运行PowerShell cmdlet启用Windows Hyper-V功能:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -Verbose
- 通过运行PowerShell cmdlet确保启用Windows容器功能:
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All -Verbose
- 通过在提升的命令提示符下运行命令,确保在引导配置数据库(BCD)中将Hypervisor设置为自动启动:
bcdedit /set hypervisorlaunchtype Auto
运行上述所有内容并重新启动Azure VM后,Docker应该正常启动。
除了上面的答案,用于设置虚拟机设置的PowerShell cmdlet是:
Set-VMProcessor -VMName <Enter-VM-Name> -ExposeVirtualizationExtensions $true -Verbose
仍然有问题,还没有重新启动?! - 通过运行以下命令重新启动Windows服务:
net stop vmms
net start vmms
大家好我已经找到了解决这个问题的答案,希望这些内容可以帮助那些有同样问题的人。 1.在虚拟机设置中设置VM(如下图所示)
普通话参考URL
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
我去了docker设置并在General
部分选择安装other version
(页面底部为链接)。我最初安装了stable
,改为beta
/ edge。
这没有任何问题。
这些步骤适用于Windows 10 Pro v1809。首先,关闭Docker错误窗口。然后
开始> Windows安全应用>应用和浏览器控制>漏洞利用保护>漏洞利用保护设置>程序设置> vmcompute.exe>编辑>代码流保护(CFG)>
Uncheck "Override system settings" > Apply
在高架cmd窗口启动服务
net start vmcompute
然后再次启动Docker Desktop,这次应该启动
实际上原因是您没有在主机上启用ExposeVirtualizationExtensions。 关闭嵌套的VM。在主机上运行PS命令:
Set-VMProcessor -VMName "NESTED VM NAME" -ExposeVirtualizationExtensions $true
然后再次启动嵌套VM(其中包含docker)。