Docker-machine create fails when specifying --engine-label

Expected behavior

Having a machine created with a specific label

Actual behavior

The creation process fails with the docker daemon on the machine not responding


  • the output of:
    • pinata diagnose -u on OSX:

OS X: version 10.11.5 (build: 15F34) version: v1.11.1-beta14.5.m
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160610-094739.tar.gz
Most specific failure is: No error was detected
Your unique id is: D968D4F4-AC9D-47E2-B2CD-B63EC0AE0B10
Please quote this in all correspondence.

Steps to reproduce the behavior

  1. docker-machine --debug create --driver virtualbox dc1-swarm-1
    This will create a fully functional machine: OK
    2.docker-machine rm dc1-swarm-1
    Remove the machine
  2. docker-machine create --driver virtualbox --engine-label “dc1” dc1-swarm-1
    Create the same machine but with a label … will FAIL with the following messages:

Creating machine…
(dc1-swarm-1) Copying /Users/dominique/.docker/machine/cache/boot2docker.iso to /Users/dominique/.docker/machine/machines/dc1-swarm-1/boot2docker.iso…
(dc1-swarm-1) Creating VirtualBox VM…
(dc1-swarm-1) Creating SSH key…
(dc1-swarm-1) Starting the VM…
(dc1-swarm-1) Check network to re-create if needed…
(dc1-swarm-1) 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…
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded


Same issue with the “amazonec2” driver

Got it working with the following syntax:

–engine-label dc=1