Search code examples
dockerboot2docker

Docker-machine - IP address conflict


Here are my environment:

  • Windows 7 64 bit
  • Docker for windows

When I create new machine, I encounter the IP address conflict:

IP Address conflict

And the console is stuck at phase starting VM

Creating VirtualBox VM... 
Creating SSH key... 
Starting VirtualBox VM... 
Starting VM...

Furthermore, when I press Ctrl-C to stop the script and run eval "$(docker-machine env dev)", I receive following error:

$ eval "$(docker-machine env dev)"
open C:\Users\jacob.phan\.docker\machine\machines\dev\ca.pem: The system cannot
find the file specified.

Solution

  • I was struggling for this problem for a while, in the end, i notice it there is wrong network interface created in boot2docker for new VM:

    If you have network different than this, then try to check your network configuration.

    Ethernet adapter VirtualBox Host-Only Network:
    
       Connection-specific DNS Suffix  . :
       Link-local IPv6 Address . . . . . : fe80::6198:761d:eec:5394%18
       IPv4 Address. . . . . . . . . . . : 192.168.56.1
       Subnet Mask . . . . . . . . . . . : 255.255.255.0
       Default Gateway . . . . . . . . . :
    

    I had one wrong VirtualBox DHCP Network created at that time, which cause the problem. When I deleted, everything goes fine