Docker Toolbox 1.8.1b on Windows hangs starting vm, ca.pem not found

The docker machine is created in virtualbox and appears to be fully loaded by looking at the Virtualbox Interface Preview, yet hangs indefinitely on ‘Starting Virtualbox VM’

C:>docker-machine create --driver virtualbox docker1
Creating CA: C:\Users…docker\machine\certs\ca.pem
Creating client certificate: C:\Users…docker\machine\certs\cert.pem
Image cache does not exist, creating it at C:\Users…docker\machine\cache…
No default boot2docker iso found locally, downloading the latest release…
Downloading https://github.com/boot2docker/boot2docker/releases/download/v1.8.1/boot2docker.iso to C:\Users…docker\machine\cache\boot2docker.iso…
Creating VirtualBox VM…
Creating SSH key…
Starting VirtualBox VM…
Starting VM…

If I kill this process, and run ‘docker-machine env docker1 --shell cmd’ I get an issue with the ca.pem - the file is not where docker-machine is looking for it.
C:>docker-machine env docker1 --shell cmd
open C:\Users…docker\machine\machines\docker1\ca.pem: The system cannot find the file specified.

I’ve fixed this issue before by removing all virtualbox machines, the .docker directory, and rebooting my box. But eventually after creating/removing machines I’ll eventually end back up in this state.

1 Like

If docker machine fails to create the VM and ends up hanging, killing the process will prevent the rest of the setup from happening. I’ve seen this sort of thing in the past, but I’m not sure if it’s more of a virtualbox thing or a docker-machine thing.

You should be able to recover by issuing docker-machine rm -f docker1, double checking in the virtualbox gui that it’s really gone, and re-creating only that machine.

Hopefully this workaround also works for you, since the one you are using is pretty much the nuclear option.

/Jeff

At the time of this write up, I got really stuck in this state. I forcefully removed the vm, rebooted the box, but always the same behavior. When I reasearched other driver support for docker-machine, I switched to hyper-v and haven’t had any problems bringing up and destroying machines.