Docker:Hyper-V无法找到名称为“ DockerNAT”的虚拟交换机。 [英] Docker : Hyper-V was unable to find a virtual switch with name "DockerNAT"

查看:167
本文介绍了Docker:Hyper-V无法找到名称为“ DockerNAT”的虚拟交换机。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 10专业版上更新了适用于桌面应用程序(2.0.0.3版)的docker。但是从那时起,我的docker就没有启动并引发以下错误。

I updated my docker for desktop app (Version 2.0.0.3) on Windows 10 pro.But since then my docker is not starting and throwing following error.

Hyper-V\Get-VMNetworkAdapter : Hyper-V was unable to find a virtual switch with name "DockerNAT".
At C:\Program Files\Docker\Docker\resources\MobyLinux.ps1:121 char:25
+ ... etAdapter = Hyper-V\Get-VMNetworkAdapter -ManagementOS -SwitchName $S ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (DockerNAT:String) [Get-VMNetworkAdapter], VirtualizationException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.GetVMNetworkAdapter

我按照链接中提到的步骤进行操作(
我也尝试过禁用->重新启动->,然后使用打开或关闭窗口功能来启用Hyper V和容器选项在控制面板\程序\程序和功能中

I followed the steps mentioned in the link (Docker on windows 10 can't startup after deleting MobyLinuxVM in Hyper-V manually ) , but it did not fix the issue. I have also tried disabling --> restarting --> and then enabling Hyper V and containers option using "Turn windows feature on or off" present at "Control Panel\Programs\Programs and Features"

我的网络连接具有以下信息

My network connection has following information

但是我仍然无法启动Windows Docker应用,该应用不断抛出

But still I am not being able to start my windows Docker app, which keeps throwing

Hyper-V was unable to find a virtual switch with name "DockerNAT".
at New-Switch, <No file>: line 121
at <ScriptBlock>, <No file>: line 411


推荐答案

我也曾经遇到过这个问题。

I also faced this issue once.

我尝试了几种解决方法但没有任何效果。问题是MobyLinuxVM无法创建Docker NAT交换机,结果是无法启动Docker服务。

I tried several workarounds but nothing worked. The issue was that the MobyLinuxVM could not create the Docker NAT switch, as a result Docker service could not be started.

工作中的解决方案是要重置我的网络设置。我不记得是否必须删除计算机管理中的所有与网络相关的条目,以便从头开始重新初始化。

The working solution was to reset my network settings. I cannot remember if I had to remove all network related entries in Computer Management in order to be re-initialized from scratch.

重要:您将丢失所有用户定义的与网络相关的设置。如果一切都失败了,请尝试一下。

Important: You will lose all user defined network-related settings. Try it if everything else fails.

编辑:您可以尝试执行的另一件事是通过执行以下命令来重新启动Hyper-V管理服务在管理外壳中:

Another thing you can try is to restart the Hyper-V management service by executing the following commands in an admin shell:

net stop vmms
net start vmms

在相关的 github问题

这篇关于Docker:Hyper-V无法找到名称为“ DockerNAT”的虚拟交换机。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆