I tried to create a machine on Windows 10 with hyperv with the following command:
docker-machine create --driver hyperv default
But it gave me:
This machine has been allocated an IP address, but Docker Machine could not
reach it successfully.
Here's the full output:
$ docker-machine create --driver hyperv default
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\Eugene\.docker\machine\cache\boot2docker.iso to C:\Users\Eugene\.docker\machine\machines\default\boot2docker.iso...
(default) Creating SSH key...
(default) Creating VM...
(default) Using switch "DockerNAT"
(default) Creating VHD
(default) Starting VM...
(default) Waiting for host to start...
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 using.
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: C:\Program Files\Docker\Docker\Resources\bin\docker-machine.exe env default
Although I can connect the machine via docker-machine ssh default.
First I thought that this error caused by virtualbox which is also installed, but its removing didn't help. As well as removing .docker folder.
Please help. Thanks in advance.
You should try adding a Hyper-V Virtual Switch, similar to here. Then try again to create the machine like this:
docker-machine create -d hyperv --hyperv-virtual-switch "Virtual Switch1" manager1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With