自从我将计算机上的Docker升级到beta27之后,我就无法使用默认网络运行Windows容器。我收到以下信息:
docker: Error response from daemon: container xxx encountered an error during Start failed in Win32: The system cannot find the path specified. (0x3): Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.我已经卸载/删除了所有东西(Docker,Hyper,容器特性,以及C:\ProgramData\Docker中遗留的文件),然后重新安装所有东西,但是问题仍然存在。
我意识到nat适配器在Hyper中不再存在,但是DockerNat适配器已经存在了。
这篇文章提供了一个重新设置网络组件的脚本,但我无法删除容器网络。
PS C:\WINDOWS\system32> Get-ContainerNetwork
Name Id Subnets Mode SourceMac DNSServers DNSSuffix
---- -- ------- ---- --------- ---------- ---------
nat 12706897-fc71-41fc-9046-a7be0d01727e {172.16.0.0/12} NAT
PS C:\WINDOWS\system32> Get-ContainerNetwork | Remove-ContainerNetwork
Confirm
Remove-ContainerNetwork will remove the container network "".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
Remove-ContainerNetwork : Unspecified error
At line:1 char:24
+ Get-ContainerNetwork | Remove-ContainerNetwork
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Remove-ContainerNetwork], VirtualizationException
+ FullyQualifiedErrorId : OperationFailed,Microsoft.Containers.PowerShell.Cmdlets.RemoveContainerNetwork
PS C:\WINDOWS\system32> Remove-ContainerNetwork -Name nat
Confirm
Remove-ContainerNetwork will remove the container network "nat".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
Remove-ContainerNetwork : Unspecified error
At line:1 char:1
+ Remove-ContainerNetwork -Name nat
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Remove-ContainerNetwork], VirtualizationException
+ FullyQualifiedErrorId : OperationFailed,Microsoft.Containers.PowerShell.Cmdlets.RemoveContainerNetwork
PS C:\WINDOWS\system32>是否有一个注册表项,我可以删除,以删除网络,因为它未能通过PowerShell删除它?
发布于 2016-12-13 19:01:42
尝试使用以下方法删除NAT网络:
Get-NetNat | Remove-NetNat您也可以尝试重新启动HNS和docker。
Restart-Service hns
Restart-Service dockerhttps://serverfault.com/questions/806246
复制相似问题