【问题标题】:Service failed to start the virtual machine 'DockerDesktopVM' because one of the Hyper-V components is not running服务无法启动虚拟机“DockerDesktopVM”,因为其中一个 Hyper-V 组件未运行
【发布时间】:2020-07-31 10:39:09
【问题描述】:

我有 Window Server 2016/2019 虚拟机(Openstack)。在该 Hyper-V 上安装成功。但无法启动 MobyLinuxVM。

ExposeVirtualizationExtensions 已通过 PowerShell 在虚拟机上启用。

Docker.Core.DockerException:
Docker.Core.Backend.BackendDestroyException:
Unable to start Hyper-V VM: 'DockerDesktopVM' failed to start.

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

'DockerDesktopVM' failed to start. (Virtual machine ID 96BDA1DB-4163-4FA5-BEF2-62F1BEC1697E)

The Virtual Machine Management Service failed to start the virtual machine 'DockerDesktopVM' because one of the Hyper-V components is not running (Virtual machine ID 96BDA1DB-4163-4FA5-BEF2-62F1BEC1697E).
at Start-MobyLinuxVM, <No file>: line 688
at <ScriptBlock>, <No file>: line 811
   at Docker.Backend.ContainerEngine.Linux.Start(Settings settings, String daemonOptions, Credential credential)
   at Docker.Backend.BackendNamedPipeServer.<Run>b__8_2(Object[] args)
   at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass9_0.<Register>b__0(Object[] parameters)
   at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters)

  System.Management.Automation.RuntimeException:
  Unable to start Hyper-V VM: 'DockerDesktopVM' failed to start.

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

  'DockerDesktopVM' failed to start. (Virtual machine ID 96BDA1DB-4163-4FA5-BEF2-62F1BEC1697E)

The Virtual Machine Management Service failed to start the virtual machine 'DockerDesktopVM' because one of the Hyper-V components is not running (Virtual machine ID 96BDA1DB-4163-4FA5-BEF2-62F1BEC1697E).
  at Start-MobyLinuxVM, <No file>: line 688
  at <ScriptBlock>, <No file>: line 811
     at Docker.Backend.ContainerEngine.Linux.DoStart(Settings settings, String daemonOptions, Credential credential)
     at Docker.Backend.ContainerEngine.Linux.Start(Settings settings, String daemonOptions, Credential credential)

     Microsoft.HyperV.PowerShell.VirtualizationException:
     'DockerDesktopVM' failed to start.

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

     'DockerDesktopVM' failed to start. (Virtual machine ID 96BDA1DB-4163-4FA5-BEF2-62F1BEC1697E)

The Virtual Machine Management Service failed to start the virtual machine 'DockerDesktopVM' because one of the Hyper-V components is not running (Virtual machine ID 96BDA1DB-4163-4FA5-BEF2-62F1BEC1697E).

         Microsoft.Virtualization.Client.Management.VirtualizationOperationFailedException:
         'DockerDesktopVM' failed to start.

Failed to start the virtual machine 'DockerDesktopVM' because one of the Hyper-V components is not running.
            at Microsoft.Virtualization.Client.Management.View.EndMethodReturnInternal(IVMTask task, VirtualizationOperation operation, Boolean affectedElementExpected)
            at Microsoft.Virtualization.Client.Management.VMComputerSystemBaseView.EndSetState(IVMTask setStateTask)
            at Microsoft.HyperV.PowerShell.ExtensionMethods.OperationWatcherExtensions.<>c__DisplayClass4_0`1.<ConvertActionToFunction>b__0(T x)
            at Microsoft.HyperV.PowerShell.ExtensionMethods.OperationWatcherExtensions.PerformOperationWithReturn[T](IOperationWatcher watcher, Func`1 startTaskMethod, Func`2 endTaskMethod, String taskDescription, VirtualizationObject targetObject)
            at Microsoft.HyperV.PowerShell.VirtualMachine.ChangeState(VirtualMachineAction action, IOperationWatcher operationWatcher)
            at Microsoft.HyperV.PowerShell.Commands.StartVM.ProcessOneOperand(VirtualMachine vm, IOperationWatcher operationWatcher)
            at Microsoft.HyperV.PowerShell.Commands.VirtualizationCmdlet`1.ProcessOperands(IList`1 operands, IOperationWatcher operationWatcher)

   at Docker.Core.Pipe.NamedPipeClient.<TrySendAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters)
   at Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean showWelcomeWindow, Boolean withNotifications)
   at Docker.Actions.<>c__DisplayClass26_0.<StartAsync>b__0()
   at Docker.ApiServices.TaskQueuing.TaskQueue.<>c__DisplayClass18_0.<.ctor>b__1()

【问题讨论】:

  • 你是怎么解决这个问题的?
  • @Loran 如果你有实际的硬件(不是虚拟机),那么你可以在系统 BIOS 中启用 VT-X 虚拟化。如果您有任何云虚拟机,那么该云提供商允许您使用此选项,然后就可以了。作为这个 Hyper-V,我们需要 Linux 相关容器,我在管道中使用了两个 VM。一个用于实际代码构建的 Windows VM,然后存储这些文件,并在 Linux VM 中构建 docker 映像。如果您只需要 windows 容器,则不需要 HyperV。

标签: docker virtualbox openstack hyper-v windows-server-2016


【解决方案1】:

我遇到了同样的问题,我按照以下步骤解决了这个问题。 如果您能够运行 Windows 容器,则意味着 Hyper-V 存在问题

  1. 通过以下方式在 VM 上启用 hyper -
  2. 我们也必须启用硬件虚拟化,这可以通过(IT 团队可以提供帮助,因为这应该在 CPU 级别完成)

【讨论】:

    【解决方案2】:

    解决办法

    1. 在 Windows 管理工具下打开 Hyper-V 管理器
    2. 注意 DockerDesktopVM 不在虚拟机下运行
    3. 在“操作”窗格下,单击“停止服务”,然后单击“启动服务”
    4. 重启 Docker 桌面

    它对我有用

    【讨论】:

      【解决方案3】:

      确保在您的 BIOS 中启用了 VT-X 虚拟化

      【讨论】:

      • 它是openstack VM,所以没有设置BIOS的选项
      猜你喜欢
      • 2018-06-23
      • 2019-09-25
      • 2022-10-13
      • 2020-11-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-23
      相关资源
      最近更新 更多