Using Docker for Window's docker-machine create

Expected behavior

Creation of a new docker host (VM)

Actual behavior

Creation failed

Information

Output from docker-machine create -d hyperv tempbox1
Running pre-create checks…
Creating machine…
(tempbox1) Copying C:\Users\Christian.docker\machine\cache\boot2docker.iso to C:\Users\Christian.docker\machine\machin
es\tempbox1\boot2docker.iso…
(tempbox1) Creating SSH key…
(tempbox1) Creating VM…
(tempbox1) Using switch “DockerNAT”
(tempbox1) Creating VHD
(tempbox1) Starting VM…
(tempbox1) 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…
Error creating machine: Error detecting OS: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded

Steps to reproduce the behavior

  1. Run docker-machine create -d hyperv tempbox1
1 Like

Nice find.

This is because docker-machine will tend to use the DockerNAT switch by default. I tried creating a separate external switch and using that, as mentioned in the docs. This works fine:

docker-machine create -d hyperv --hyperv-virtual-switch external-switch tempbox1

Overall, we don’t envision users using docker-machine to create more local machines (it’s included to create remote machines).

I’ve created an issue to track documenting this more clearly.

2 Likes

OK, thanks for the reply!

you might want to re-think this, especially if someone is going through the docker-swarm getting started docs…

docs will certainly help. :slight_smile:

1 Like

Hi Doug, Thanks, this thread is helpful. I’ve updated the Swarm docs some but am updating both the Docker for Windows and Docker Machine docs again today to make sure they properly cover using Docker for Windows version of Docker Machine w/hyperv driver, and for use with multi-node Swarm.

I’ll try to remember to ping you on this thread when the new docs are up.–Vicky

Hi, new docs are up now regarding the Microsoft Hyper-V driver for Docker Machine, and how to use Docker Machine with Docker for Windows.

Please see https://docs.docker.com/machine/get-started/ and https://docs.docker.com/machine/drivers/hyper-v/.

Thanks for the feedback on the docs!

–Vicky

Looks great Vicky! Thanks!

Is it a must to be plugged in via Ethernet? I’ve tried following the instructions in that link except the Ethernet one (my ultrabook doesn’t have the port) and got stuck still, although now the number of retries are limited:

Waiting for SSH to be available...
Error creating machine: Error detecting OS: Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded

What can I do?

docker-machine.exe version 0.10.0, build 76ed2a6
windows 10

I had a similar issue
Does trying any of the instructions at http://stackoverflow.com/questions/34641003/error-checking-tls-connection-error-checking-and-or-regenerating-the-certs
help ?

similar question
PS D:\Program Files\Docker Toolbox> docker-machine -v
docker-machine.exe version 0.14.0, build 89b8332
PS D:\Program Files\Docker Toolbox> docker-machine --storage-path=“D:\Program Files\Docker Toolbox\class1” create --engine-registry-mirror=https://someid.mirror.aliyuncs.com -d virtualbox redbox
Running pre-create checks…
Creating machine…
(redbox) Copying D:\Program Files\Docker Toolbox\class1\cache\boot2docker.iso to D:\Program Files\Docker Toolbox\class1\machines\redbox\boot2docker.iso…
(redbox) Creating VirtualBox VM…
(redbox) Creating SSH key…
(redbox) Starting the VM…
(redbox) Check network to re-create if needed…
(redbox) Windows might ask for the permission to configure a dhcp server. Sometimes, such confirmation window is minimized in the taskbar.
(redbox) Waiting for an IP…
Error creating machine: Error in driver during machine creation: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded