Docker-machine错误“找不到MAC地址的匹配IP”在Windows 10上 [英] Docker-machine error "Could not find matching IP for MAC address" on Windows 10

查看:2555
本文介绍了Docker-machine错误“找不到MAC地址的匹配IP”在Windows 10上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



以前曾经工作过,但经过一些Windows 10的更新之后,我在Docker机器上遇到了奇怪的问题。我开始收到错误找不到匹配的IP地址...。这个错误出现在使用docker-machine的任何操作上。



例如,使用docker-machine ls:



我尝试使用虚拟框(具有不同的网络驱动程序)重新安装dockertools。试图安装最新版本的虚拟盒。删除并重新创建Docker虚拟机。删除所有的vitrualbox主机网络。这一切都没有帮助。



这是我使用docker-machine -D create -d virtualbox的默认值:





docker-machine env default:





docker-machine regenerate-certs:



< a href =https://i.stack.imgur.com/eSU4P.png =noreferrer>



有人可以指出我的方向吗?什么可以导致这样的问题?



谢谢!






VonC提出的尝试方法。


  1. 删除虚拟机,清理驱动程序和注册表,建议如何。

  2. 重新启动PC。

  3. 安装最新的虚拟机(版本5.0.18 r106667)

  4. 重新启动PC。

  5. 按照建议设置环境。

这是结果。

  C:\Users\Vadim> Desktop\env.bat 

C:\Users\Vadim> rem最小路径:



C:\Users\Vadim>设置PATH = C:\Windows\system32; C :\Windows; C:\Windows\System32\Wbem



C:\Users\Vadim> rem添加Git到PATH



C:\Users\Vadim> rem set glatest = PortableGit-2.8.1-64-bit



C:\\ \\Users\Vadim>设置PATH = C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbe米;
C:\Program Files\Git\bin; C:\Program Files\Git\usr\bin; C:\Program Files\Git



C:\Users\Vadim> set TERM = msys



C:\Users\Vadim>设置GIT_HOME = C:\\ \\ Program Files \Git



C:\Users\Vadim> rem将VirtualBox添加到PATH



C:\Users\Vadim>设置PATH = C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem;
C:\Program Files\Git\bin; C:\Program Files\Git\usr\bin; C:\Program Files\Git; C:\Pr
ogram Files\Oracle\VirtualBox



C:\Users\Vadim> rem添加docker-machine到PATH



C:\Users\Vadim> set PATH = C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem;
C:\Program Files\Git\bin; C:\Program Files\Git\usr\bin; C:\Program Files\Git; C:\Pr
ogram Files\Oracle\VirtualBox; C:\Program Files\Docker Toolbox



C:\Users\Vadim>设置路径
Path = C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Program Files\Gi
t\bin; C:\\ \\ Program Files \Git\usr\bin; C:\Program Files\Git; C:\Program Files\Oracle\
VirtualBox; C:\Program Files\Docker Toolbox
PATHEXT = .COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS; .JSE; .WSF; .WSH; .MSC



运行预创建检查...
创建机器...
(测试)复制C(C)\Users\Vadim> docker-machine create -d virtualbox test
:\Users\Vadim.docker\machine\cache\boot2docker.iso到C:\Users\
Vadim.docker\machine\machines\test\boot2docker.iso ...
(测试)创建VirtualBox VM ...
(测试)创建SSH密钥
(测试)启动VM ...
(测试)检查网络重新创建,如果需要...
(测试)Windows可能会要求创建一个网络适配器的权限。 Sometim
es,任务栏中的这种确认窗口最小化。
(测试)找到一个新的仅适用于主机的适配器:VirtualBox仅主机以太网适配器#2



(测试)Windows可能会要求获得配置网络适配器。一些
次,这样的确认窗口在任务栏中被最小化。
(测试)Windows可能会要求配置dhcp服务器的权限。有时
,这样的确认窗口在任务栏中被最小化。
(测试)等待IP ...
等待机器运行,这可能需要几分钟...
检测创建的​​实例的操作系统...
等待SSH可用...
检测供应商...
配置boot2docker ...
将证书复制到本地机器目录...
复制证书到远程机器...
创建机器时出错:运行配置错误:找不到匹配的IP f
或MAC地址080027d6b14d



我还是得到关于IP和MAC的这个错误。






进一步调查。
如VonC所建议的,我已经用docker-machine 0.6.0重试了。而且我有其他错误:



由于显然是尝试在虚拟机上使用eth1界面,已经检查了发生了什么(所有这一次我可以看到vms创建和工作在虚拟框界面)。
这是我在访客VM中看到的:



正如你可以看到eth1界面不没有指定ip4地址。
这可能是问题的原因以及如何解决?

解决方案

该错误消息来自动态确定主机接口,停止假设eth1 PR 3112 修复 issue 3108



我会尝试:




  • 完全卸载VirtualBox,

  • 删除中的任何vbox *文件C:\Windows\system32\drivers\

  • 删除 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services中的任何vbox *文件夹

  • 重新安装 virtualbox 5.0.18 及其Oracle VM VirtualBox扩展包
  • 仅使用CMD(不需要bash以避免任何副作用)



将您的PATH设置为senv.bat脚本将包括(更改您的设置的路径):

  rem最小路径:
设置路径= C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem

rem添加Git到PATH
set glatest = PortableGit-2.8 .1-64位
设置PATH =%PATH%; C:\Personal_Unsaved\prgs\git\%glatest%\bin; C:\Personal_Unsaved\prgs\git\ %glatest%\usr\bin; C:\Personal_Unsaved\prgs\git\%glatest%
set TERM = msys
set GIT_HOME = C:\Personal_Unsaved\prgs\\ \\ git\%glatest%

rem将VirtualBox添加到PATH
设置PATH =%PATH%; C:\Personal_Unsaved\prgs\vbox\latest

rem将docker-machine添加到PATH
设置PATH =%PATH%; C:\Personal_Unsaved\prgs\dm\latest

比在这里新的环境,最新的docker-machine 0.7.0 ,创建一个新的机器:

  docker-machine create -d virtualbox test 
docker-mahcine ssh test

(使用docker-machine中的ssh,而不是git bash中的ssh)



< a href =https://stackoverflow.com/users/406290/kevin-hooke> Kevin Hooke 在下面提到在评论(2016年7月):


下载并安装最新的工具箱后,我在Windows 7上的1.11.2上出现了同样的错误。更新工具箱后才会出错。



即使删除VirtualBox中的默认VM也会在重新创建时收到相同的错误。



我在GitHub上面的答案中注意到,它提到VirtualBox 5.0.14,所以我刚刚更新到5.0.24。启动快速启动提示,它重新创建默认的vm,现在没有问题。



I got strange problem with docker-machine on windows 10. And I still cannot find solution.

It used to work before, but after some update of Windows 10 I began to get error "Could not find matching IP for MAC address ...". This error appears on any action with docker-machine.

For example, with docker-machine ls:

I tried to reinstall dockertools with virtual box (with different network drivers). Tried to install latest version of virtual box. Remove and recreate docker virtual machine. Remove all vitrualbox host-only networks. It all doesn't help.

Here is what I get with docker-machine -D create -d virtualbox default:

docker-machine env default:

docker-machine regenerate-certs:

Could anybody point me in the right direction? What can cause such problem?

Thanks!


I've tried method suggested by VonC.

  1. Remove virtualbox and clean drivers and registry how suggested.
  2. Reboot PC.
  3. Install latest virtualbox (Version 5.0.18 r106667)
  4. Reboot PC.
  5. Set environment as suggested.

This is result.

C:\Users\Vadim>Desktop\env.bat

C:\Users\Vadim>rem minimal path:

C:\Users\Vadim>set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem

C:\Users\Vadim>rem add Git to PATH

C:\Users\Vadim>rem set glatest=PortableGit-2.8.1-64-bit

C:\Users\Vadim>set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git

C:\Users\Vadim>set TERM=msys

C:\Users\Vadim>set GIT_HOME=C:\Program Files\Git

C:\Users\Vadim>rem add VirtualBox to PATH

C:\Users\Vadim>set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git;C:\Pr ogram Files\Oracle\VirtualBox

C:\Users\Vadim>rem add docker-machine to PATH

C:\Users\Vadim>set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git;C:\Pr ogram Files\Oracle\VirtualBox;C:\Program Files\Docker Toolbox

C:\Users\Vadim>set path Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Gi t\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git;C:\Program Files\Oracle\ VirtualBox;C:\Program Files\Docker Toolbox PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

C:\Users\Vadim>docker-machine create -d virtualbox test Running pre-create checks... Creating machine... (test) Copying C:\Users\Vadim.docker\machine\cache\boot2docker.iso to C:\Users\ Vadim.docker\machine\machines\test\boot2docker.iso... (test) Creating VirtualBox VM... (test) Creating SSH key... (test) Starting the VM... (test) Check network to re-create if needed... (test) Windows might ask for the permission to create a network adapter. Sometim es, such confirmation window is minimized in the taskbar. (test) Found a new host-only adapter: "VirtualBox Host-Only Ethernet Adapter #2"

(test) Windows might ask for the permission to configure a network adapter. Some times, such confirmation window is minimized in the taskbar. (test) Windows might ask for the permission to configure a dhcp server. Sometime s, such confirmation window is minimized in the taskbar. (test) Waiting for an IP... Waiting for machine to be running, this may take a few minutes... Detecting operating system of created instance... Waiting for SSH to be available... Detecting the provisioner... Provisioning with boot2docker... Copying certs to the local machine directory... Copying certs to the remote machine... Error creating machine: Error running provisioning: Could not find matching IP f or MAC address 080027d6b14d

I still get this error about IP and MAC.


Further investigation. As was suggested by VonC I've retried this with docker-machine 0.6.0. And I got other error:

As it's obviously trying to work with eth1 interface on virtual machine I've checked what's going on (all this time I could see vms created and worked in virtual box interface). This is what I see into guest VM:

As you can see eth1 interface doesn't have ip4 address specified. Can it be the cause of problem and how to fix it?

解决方案

That error message comes from "Determine host-only interface dynamically, stop assuming eth1" and PR 3112 fixing issue 3108

I would try to:

  • uninstall completely VirtualBox,
  • delete any vbox* file in C:\Windows\system32\drivers\,
  • delete any vbox* folders in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services
  • reinstall virtualbox 5.0.18 and its Oracle VM VirtualBox Extension Pack
  • use CMD only (no bash to avoid any side-effect)

Set your PATH by an senv.bat script which would include (change the path to your setup):

rem minimal path:
set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem

rem add Git to PATH
set glatest=PortableGit-2.8.1-64-bit
set PATH=%PATH%;C:\Personal_Unsaved\prgs\git\%glatest%\bin;C:\Personal_Unsaved\prgs\git\%glatest%\usr\bin;C:\Personal_Unsaved\prgs\git\%glatest%
set TERM=msys
set GIT_HOME=C:\Personal_Unsaved\prgs\git\%glatest%

rem add VirtualBox to PATH
set "PATH=%PATH%;C:\Personal_Unsaved\prgs\vbox\latest"

rem add docker-machine to PATH
set PATH=%PATH%;C:\Personal_Unsaved\prgs\dm\latest

Than, in that new environment, with the latest docker-machine 0.7.0, create a new machine:

docker-machine create -d virtualbox test
docker-mahcine ssh test

(use ssh from docker-machine, not ssh from a git bash)

Kevin Hooke mentions below in the comments (July 2016):

I had this same error on 1.11.2 on Windows 7 after downloading and installing the latest Toolbox. Error only started after updating Toolbox.

Even after deleting the default VM in VirtualBox would get the same error when it was recreated.

I noticed in the ticket mentioned in the answer above on GitHub that it mentions VirtualBox 5.0.14, so I just updated to 5.0.24. Started up the Quickstart prompt, it recreated the default vm, and now no issue.

这篇关于Docker-machine错误“找不到MAC地址的匹配IP”在Windows 10上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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