Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

docker - Failed to start the virtual machine 'MobyLinuxVM' because one of the Hyper-V components is not running

I have got some problem when I installed Docker with Window Server.
The environment 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

the problem picture and content
enter image description here

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:gopathsrcgithub.comdockerpinatawinsrcDocker.BackendContainerEngineLinux.cs:line 256
   at Docker.Backend.ContainerEngine.Linux.Start(Settings settings, String daemonOptions) in C:gopathsrcgithub.comdockerpinatawinsrcDocker.BackendContainerEngineLinux.cs:line 130
   at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass9_0.<Register>b__0(Object[] parameters) in C:gopathsrcgithub.comdockerpinatawinsrcDocker.CorepipeNamedPipeServer.cs:line 47
   at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters) in C:gopathsrcgithub.comdockerpinatawinsrcDocker.CorepipeNamedPipeServer.cs:line 145

How can I fix this problem issue,Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Here is a solution if you are getting this error on an Azure Windows 10 VM where you have installed Docker and this is already Nested Virtualization capable VM in other words your Azure VM must be V3 sized as minimum (DV3 or 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

After running all of the above and you restart the Azure VM, Docker should be starting normally.

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...