【发布时间】:2019-07-03 01:18:32
【问题描述】:
我刚刚在 Windows 10 上安装了 Docker。 当我以管理员身份运行 Docker 时,出现以下错误:
Unable to create: The running command stopped because the preference
variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V
encountered an error trying to access an object on computer 'WP2975' because
the object was not found. The object might have been deleted. Verify that
the Virtual Machine Management service on the computer is running.
at New-Switch, <No file>: line 121
at <ScriptBlock>, <No file>: line 411
at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters)
in C:\workspaces\stable 18.09.x\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeClient.cs:line 36
at Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean
showWelcomeWindow, Boolean executeAfterStartCleanup) in
C:\workspaces\stable-
18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 92
at Docker.Actions.<>c__DisplayClass19_0.<Start>b__0() in
C:\workspaces\stable-
18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 74
at Docker.WPF.TaskQueue.<>c__DisplayClass19_0.<.ctor>b__1() in
C:\workspaces\stable-
18.09.x\src\github.com\docker\pinata\win\src\Docker.WPF\TaskQueue.cs:line 59
我检查了计算机上是否正在运行 Hyper-V。
我还在powershell中做了以下操作:
确保通过运行 PowerShell cmdlet 启用 Windows Hyper-V 功能:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -Verbose
通过运行 PowerShell cmdlet 确保启用 Windows 容器功能:
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All -Verbose
确保 Hypervisor 在引导配置数据库 (BCD) 中设置为自动启动 通过在提升的命令提示符下运行命令:
bcdedit /set hypervisorlaunchtype Auto
但没有任何帮助。
我也重装了两次docker。
【问题讨论】:
-
您是否尝试过以管理员身份在命令提示符中运行
MOFCOM %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof。之后重新启动您的机器。在这里找到:community.spiceworks.com/how_to/… -
商务部无法识别,我试过了
-
抱歉,打错字了(MOFCOMP 不是 mofcom):
MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof -
我在回答并尝试之后才注意到,但即使在重新启动后也没有帮助。
-
您使用的 Windows 版本号是多少,好像是最新的?
标签: docker