【问题标题】:hyper-v generic failure when trying to make new vmswitch尝试制作新的 vmswitch 时出现 hyper-v 通用故障
【发布时间】:2020-05-03 15:01:51
【问题描述】:

我不能用 hyper-v 管理器做任何事情。我尝试的一切都会导致一般性失败。

这一切都是在 14-01-2020 更新之后开始的。

我什至尝试删除更新,但这不是因为我无法删除 3 个中的 1 个。

下一个选项是重新安装。

到目前为止我所尝试的:

dism /online /Disable-feature /FeatureName:Microsoft-Hyper-V
Try to uninstall the network adapter from the device manager, and install it again.
Enable inbound firewall rule for "Windows Management Instrumentation (DCOM-in)"
netcfg -d

当我尝试获取我的 VMswitch 时:

PS C:\Windows\system32> Get-VMSwitch
Get-VMSwitch : Generic failure

当我尝试制作新的 VMswitch 时:

PS C:\Windows\system32> New-VMSwitch -SwitchName "NAT-Switch" -SwitchType Internal -Verbose

VERBOSE: New-VMSwitch will create a new virtual switch "NAT-Switch".
New-VMSwitch : Failed while creating virtual Ethernet switch.
An unexpected error occurred: Provider is not capable of the attempted operation (0x80041024).
Failed while creating virtual Ethernet switch.
The Hyper-V Virtual Machine Management service encountered an unexpected error: Provider is not capable of the
attempted operation (0x80041024).
At line:1 char:1
+ New-VMSwitch -SwitchName "NAT-Switch" -SwitchType Internal -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-VMSwitch], VirtualizationException
    + FullyQualifiedErrorId : OperationFailed,Microsoft.HyperV.PowerShell.Commands.NewVMSwitch

我的 docker 也无法运行:

[01:59:13.556][PowerShell        ][Info   ] Run script with parameters: -Create True -VhdPathOverride C:\ProgramData\DockerDesktop\vm-data\DockerDesktop.vhdx -VhdSize 68719476736 -SwitchSubnetAddress 10.0.75.0 -SwitchSubnetMaskSize 28 -PreferredIPAddress  -CPUs 2 -Memory 2048 -IsoFile C:\Program Files\Docker\Docker\Resources\docker-desktop.iso -Verbose True -ErrorAction Stop
[01:59:13.607][HyperV            ][Info   ] Creating Switch: DockerNAT...
[01:59:13.654][HyperV            ][Error  ] Unable to create: System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Generic failure 
   at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
   at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult)
   at Docker.Core.PowerShell.<>c__DisplayClass13_0.<InvokeAsync>b__0(IAsyncResult asyncResult)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Core.PowerShell.<InvokeAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Core.PowerShell.<RunAsync>d__6.MoveNext()

即使生成了所有这些错误。我似乎无法在 Windows 事件查看器中找到其中一个。

【问题讨论】:

  • 你有没有得到这个工作?我遇到了同样的问题(几乎是一年后!)。谢谢
  • @adam197 是的,我重新安装了 Windows。但我认为第一个答案中的链接也可以提供帮助!在该评论出现之前我已经重新安装了,所以永远无法测试它。

标签: windows docker virtual-machine hyper-v


【解决方案1】:

我有同样的问题。使用 update assistant 更新到 Windows 10 1909 为我解决了这个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-21
    • 1970-01-01
    • 2014-12-07
    • 1970-01-01
    • 2020-07-13
    • 2021-06-06
    相关资源
    最近更新 更多