VirtualBox Host only adapter gets autoconfigured IP when running Docker Quickstart
After updating to the latest Docker Toolbox (with docker-machine 0.13.0) trying to run Docker Quickstart ends with failure:
Creating CA: C:\Users\username\.docker\machine\certs\ca.pem
Creating client certificate: C:\Users\username\.docker\machine\certs\cert.pem
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\username\.docker\machine\cache\boot2docker.iso to C:\
Users\username\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Windows might ask for the permission to create a network adapter. Some
times, such confirmation window is minimized in the taskbar.
(default) Found a new host-only adapter: "VirtualBox Host-Only Ethernet Adapter"
(default) Windows might ask for the permission to configure a network adapter. S
ometimes, such confirmation window is minimized in the taskbar.
(default) Windows might ask for the permission to configure a dhcp server. Somet
imes, such confirmation window is minimized in the taskbar.
(default) Waiting for an IP...
(default) The host-only adapter is corrupted. Let's stop the VM, fix the host-on
ly adapter and restart the VM
(default) Windows might ask for the permission to configure a network adapter. S
ometimes, such confirmation window is minimized in the taskbar.
(default) 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...
Setting Docker configuration on the remote daemon...
This machine has been allocated an IP address, but Docker Machine could not
reach it successfully.
SSH for the machine should still work, but connecting to exposed ports, such as
the Docker daemon port (usually <ip>:2376), may not work properly.
You may need to add the route manually, or use another related workaround.
This could be due to a VPN, proxy, or host file configuration issue.
You also might want to clear any VirtualBox host only interfaces you are not usi
ng.
Checking connection to Docker...
Error creating machine: Error checking the host: Error checking and/or regenerat
ing the certs: There was an error validating certificates for host "192.168.99.1
00:2376": dial tcp 192.168.99.100:2376: i/o timeout
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]
'.
Be advised that this will trigger a Docker daemon restart which might stop runni
ng containers.
Looks like something went wrong in step ´Checking if machine default exists´...
Press any key to continue...
In the effect Docker virtual machine is created and I can access it using Virtualbox.
However docker scripts on windows don't work. I have done some digging and found out that 'Virtualbox Host-Only Network' adapter is created with autoconfigured IP address:
IP Address/Mask: 169.254.90.4/16
where DHCP server is configured correctly:
IP: 192.168.99.2
Mask: 255.255.255.0
Lower IP limit: 192.168.99.100
Upper IP limit: 192.168.99.254
I have learned that manually changing the IP address of that adapter to 192.168.99.1 resolves this problem, but I guess this is not how this is supposed to be working.
λ docker-machine.exe --version
docker-machine.exe version 0.13.0, build 9ba6da9
λ docker --version
Docker version 18.01.0-ce, build 03596f51b1
I have in trouble with this problem too, waiting for an answer...