user2269774
user2269774

Reputation: 283

docker-machine:Error with pre-create check: "exit status 126"

When I'm type the code sudo docker-machine create --driver virtualbox default to create a new virtual machine. It can not worked. Here is the info:

xxxMacBook-Pro:~ xxx$ docker --version
Docker version 1.12.0, build 8eab29e
xxxMacBook-Pro:~ xxx$ docker-machine --version
docker-machine version 0.8.0, build b85aac1
xxxMacBook-Pro:~ xxx$ sudo docker-machine create --driver virtualbox default
Running pre-create checks...
Error with pre-create check: "exit status 126"

Please help me to figure this out.

Upvotes: 5

Views: 11004

Answers (3)

Kaka Ruto
Kaka Ruto

Reputation: 5135

Exit status 126 on a Mac indicates that you don't have Virtualbox installed, which comes separate from Docker.

Run the following command to install it:

brew cask install virtualbox;

Now you can gracefully run your command again.

NB: You don't have to use sudo, unless there are some special privileges you want to accord whatever you are creating.

Update: As of 2021 you can use

brew install --cask virtualbox

Upvotes: 12

Stefan Niemeyer
Stefan Niemeyer

Reputation: 1

I had the same problem with Docker for Mac. You need to install VirtualBox additionally from https://www.virtualbox.org/wiki/Downloads

Upvotes: 0

Motoyasu
Motoyasu

Reputation: 36

The same error occurred on my OSX, because I'v only installed docker.app. Probably, you should install docker toolbox instead of docker.app.

Docker.app doesn't include virtualbox driver, but docker toolbox includes virtual box driver.

https://www.docker.com/products/docker-toolbox

Upvotes: 0

Related Questions