Search code examples
dockerdocker-machine

Why is my docker machine not working under OSX?


I've installed Docker Toolbox v1.8.1b on OSX 10.10.5

This also installs VirtualBox v5.0.2

However, when the installation has finished and I run the Docker Quickstart Terminal, it does its thing, creates a new VM in virtualbox but then doesn't start it, finishing with the message that default is not running.

When I try to run the machine using docker-machine start default I get the message exit status 1.

When I go to VirtualBox and attempt to start the machine there, I get the following error message:

Failed to load VMMR0.r0 (VERR_VMM_SMAP_BUT_AC_CLEAR).


Result Code: 
NS_ERROR_FAILURE (0x80004005)
Component: 
ConsoleWrap
Interface: 
IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

So is anyone else getting this or am I not following the instructions properly?


Solution

  • I had exactly the same problem. It seems that there is a bug in recent versions of VirtualBox, which is fixed in the latest test build. See https://www.virtualbox.org/ticket/14412

    I downloaded the latest VirtualBox test build from https://www.virtualbox.org/wiki/Testbuilds then used the uninstaller script provided in that installer to remove the buggy version before installing the new one.

    Running the Docker QuickStart Terminal again got the default VM running, but it was missing a ca.pem file:

    docker is configured to use the default machine with IP 192.168.99.100
    For help getting started, check out the docs at https://docs.docker.com
    
    open /Users/justin/.docker/machine/machines/default/ca.pem: no such file or directory
    

    VirtualBox confirmed that the VM was running.

    I could create a new VM and use it with docker successfully (in a different Terminal window):

    Justins-MacBook:~ justin$ docker-machine create --driver virtualbox dev
    Creating VirtualBox VM...
    Creating SSH key...
    Starting VirtualBox VM...
    Starting VM...
    To see how to connect Docker to this machine, run: docker-machine env dev
    Justins-MacBook:~ justin$ eval "$(docker-machine env dev)"
    Justins-MacBook:~ justin$ docker run hello-world
    ...
    

    I then deleted the default VM:

    Justins-MacBook:.docker justin$ docker-machine stop default
    Justins-MacBook:.docker justin$ docker-machine rm default
    Successfully removed default
    

    Running the Docker QuickStart Terminal created a new default VM, and docker is now working happily with it.

    Update: There is an open issue for this at: https://github.com/docker/toolbox/issues/119