docker / machine

Machine management for a container-centric world
https://docs.docker.com/machine/
Apache License 2.0
6.63k stars 1.97k forks source link

Can't create docker-machine image on macOS with VMware Fusion driver. #4230

Open thecommandline opened 7 years ago

thecommandline commented 7 years ago

I am trying to follow the getting started guide here: https://docs.docker.com/get-started/

I completed parts 1 through 3 but on part 4 the docker-machine command is failing with the following error

docker-machine create --driver vmwarefusion myvm1
Running pre-create checks...
Creating machine...
(myvm1) Copying /Users/digitaladdictions/.docker/machine/cache/boot2docker.iso to /Users/digitaladdictions/.docker/machine/machines/myvm1/boot2docker.iso...
(myvm1) Creating SSH key...
(myvm1) Creating VM...
(myvm1) Creating disk '/Users/digitaladdictions/.docker/machine/machines/myvm1/myvm1.vmdk'
(myvm1) Virtual disk creation successful.
(myvm1) Starting myvm1...
(myvm1) Waiting for VM to come online...
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
docker-machine ls
NAME    ACTIVE   DRIVER         STATE     URL                          SWARM   DOCKER    ERRORS
myvm1   -        vmwarefusion   Running   tcp://192.168.238.132:2376           Unknown   Unable to query docker version: Get https://192.168.238.132:2376/v1.15/version: x509: certificate signed by unknown authority

I am running this on macOS 10.12.16 with docker Docker version 17.06.0-ce, build 02c1d87 docker-machine version 0.12.0, build 45c69ad and VMware Fusion Professional Version 8.5.8 (5824040).

I have deleted all custom "local" networks I previously created in VMware and have rebooted.

--

UPDATE

I just opened up VMware and was greeted with a booted myvm1 console. But I still cant ssh into it.

docker-machine ssh myvm1
exit status 255
docker-machine
tdm00 commented 7 years ago

I believe this was resolved in #4222 and was included in version v0.12.2. After manually upgrading to that version (for some reason docker-toolbox did not include it) I'm now able to successful use docker-machine create --driver vmwarefusion myvm1

thecommandline commented 7 years ago

Thanks, I can confirm that this works on docker-machine version 0.12.2, build 9371605. I just assumed I was on the latest version of docker-machine since docker toolbox (or whatever piece of software is responsible for the docker icon in my task bar) claimed there were no updates available.

tdm00 commented 7 years ago

I thought the exact same thing and only found the answer when looking earlier today. Glad you have it working. From what I've learned earlier today, and I'm new to Docker, it appears that Docker for Mac and Docker toolbox are two different things (although they have most of the same commands but versions of those commands appear to vary)

samip5 commented 4 years ago

This does not work on Mac OS X Catalina (10.15.4) with docker-machine version 0.16.2, build bd45ab13, Docker version 19.03.8, build afacb8b and VMware Fusion Professional Version 11.5.3.

How do I get it to work?


$ docker-machine create --driver vmwarefusion myvm1:
Running pre-create checks...
Creating machine...
(myvm1) Copying /Users/sm/.docker/machine/cache/boot2docker.iso to /Users/sm/.docker/machine/machines/myvm1/boot2docker.iso...
(myvm1) Creating SSH key...
(myvm1) Creating VM...
(myvm1) Creating disk '/Users/sm/.docker/machine/machines/myvm1/myvm1.vmdk'
(myvm1) Virtual disk creation successful.
(myvm1) Starting myvm1...
(myvm1) Waiting for VM to come online...
Error creating machine: Error in driver during machine creation: exit status 255
rjhind commented 4 years ago

I'm seeing the same issue on Cataline. Boot output of the VM (which only starts if you launch Fusion manually after starting docker-machine) prints 'unable to write random state' after generating the SSH keys so it's boot process fails.