Hyper-V在尝试创建新的虚拟交换机时发生了通用故障

4

我无法使用Hyper-V管理器。不论我尝试什么操作,都会出现一般性故障。

这个问题是在2020年1月14日的更新后开始出现的。

我甚至尝试了删除这些更新,但由于其中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

当我尝试获取我的VM交换机:
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
@adam197 是的,我重新安装了Windows。但我认为第一个答案中的链接也可能有帮助!在那条评论出现之前,我已经重新安装了,所以无法测试它。 - Nariman Etemadi
1个回答

1

我也遇到过同样的问题。使用update assistant更新到Windows 10 1909版本,解决了我的问题。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接