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.
- Remove virtualbox and clean drivers and registry how suggested.
- Reboot PC.
- Install latest virtualbox (Version 5.0.18 r106667)
- Reboot PC.
- 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?
Open virtual box, remove docker vm. Thet start quick-start again. I have same problem too on windows.
I had this same problem. I solved it by:
1) Remove the "VirtualBox Host-Only Ethernet Adapter" using the VirtualBox Manager gui. (Preferences->Network->Host-only Networks) In fact there were 2 of these; I deleted both.
2) Delete the default VM (again, using the VirtualBox Manager gui)
3) re-run the start.sh script
Further notes: I'm using Windows 7 and cygwin64. The start.sh script has issues with finding the path to vboxmanage. While solving these errors, I ran the start.sh script multiple times, which probably accounts for the strange state that VBox found itself in.
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.
If different IP (from previous run) is assigned on restart, docker-machine shows connectivity issues with the VM.
One approach that worked for me is to restart it in a way so that it gets same IP at restart.
E.g. if 192.168.99.102 (third in seq 100, 101, 102) was assigned at creation, then start any two other VMs before this docker machine, so that this one gets 102.
I am maintaining the commands, which had been handy in running docker in my initial days for reference:
Handy commands on docker-machine, docker and docker-compose for starters.
One day I woke up, and Docker didn't work with mentioned "Could not find matching IP for MAC address ..."
What helped me it was to:
- uninstal Docker Toolbox
- uninstall VirtualBox
- remove folder C:\Users\user_name\.docker
- remove folder C:\Users\user_name\.VirtualBox
- install Docker Toolbox again
My answers can be useful for future readers, because once I recently faced this problem, I found this question first.
all above mentioned solution did not work for me,
I have deleted Default Machine from Virtual Machine and recreated it by
docker-machine rm default
docker-machine create --driver virtualbox default
Then, I have removed network adapters as described above by Aaron Knauf
Finally, I have uninstalled docker and VirtualBox, and deleting configuration files .docker and .VirtualBox in user`s folder.
Then, After reinstalling Docker Toolbox and VirtualBox, then Docker worked well
Even if reinstalling is not good practice, it solved my problem.
This worked for me on Windows:
I ran this command -
docker-machine rm default
Then, I restarted docker-machine terminal and it assigned IP automatically.
I had a similar problem, I simply made it work by killing the VM process in the Task Manager and relaunching Docker Quickstart Terminal.
I hope this may help someone someday.