machine icon indicating copy to clipboard operation
machine copied to clipboard

Error with pre-create check: "VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path

Open pramodachar opened this issue 7 years ago • 38 comments

I have installed VirtualBox, it is in below path, I am trying to run a command "docker-machine create --driver VirtualBox default" but still getting the same error as above(Seems to be it is the incorrect path). I tried running command after changing dir to below, still not working .could anyone provide the solution for it . pramod@Pramod-VPCEH25EN:/usr/lib/virtualbox$ ls VBoxManage VBoxManage

pramodachar avatar Oct 14 '18 08:10 pramodachar

I have the same issue on my Ubuntu 18.04

codemasternode avatar Oct 21 '18 12:10 codemasternode

same here using Ubuntu 18.04.1 LTS

$ docker-machine create --driver virtualbox default

Running pre-create checks... Error with pre-create check: "VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path"

$ which virtualbox

/usr/bin/virtualbox

$ which VBoxManage

/usr/bin/VBoxManage

gityopie avatar Oct 22 '18 05:10 gityopie

any progress on this? I have the same problem

$ docker-machine create default
Running pre-create checks...
Error with pre-create check: "VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path"

$ which VBoxManage
/usr/bin/VBoxManage

ajones avatar Oct 22 '18 16:10 ajones

same. also tried installing from /usr/bin in 18.04

awuceres avatar Oct 22 '18 22:10 awuceres

Same here. This post suggests it may be due to case-sensitivity, but the suggested fix (below) did not solve the issue in my case.

sudo ln -s /usr/local/bin/VBoxManage /usr/local/bin/vboxmanage

michaelborn avatar Oct 23 '18 15:10 michaelborn

I had the same issue on 18.04, and here were the steps I took to resolve it.

  1. Reinstalled virtualbox
  2. Renamed VBoxManage to match casing
  3. Followed this guide to reinstall Docker Machine.
  4. Reinstalled bash completion scripts in etc/bash_completion.d/
  5. sudo docker-machine create --driver virtualbox default

James-Gilbert- avatar Oct 24 '18 20:10 James-Gilbert-

I had the same issue on 18.04, and here were the steps I took to resolve it.

1. Reinstalled virtualbox

2. Renamed VBoxManage to match casing

3. Followed [this](https://docs.docker.com/machine/install-machine/) guide to reinstall Docker Machine.

4. Reinstalled [bash completion scripts](https://docs.docker.com/machine/install-machine/#install-bash-completion-scripts) in `etc/bash_completion.d/`

5. `sudo docker-machine create --driver virtualbox default`

Could you please explain Step 2, what are the files we need to rename(provide with dir)

pramodachar avatar Oct 25 '18 06:10 pramodachar

For step 2, I ran sudo ln -s /usr/local/bin/VBoxManage /usr/local/bin/vboxmanage. Also, I followed the guide here when I initially installed Docker.

James-Gilbert- avatar Oct 25 '18 08:10 James-Gilbert-

Seems the key is in how virtualbox is started on the system. If virtualbox was started using sudo, then the docker-machine commands will require sudo in front of it as well. But if you start virtualbox with the same user that you want to run docker-machine with, then sudo is not needed.

Note also that the .docker folder in your home directory should be owned by the user that you run docker-machine with, if you don't want to prepend sudo all the time that is.

some more details here: https://askubuntu.com/questions/513405/vboxmanage-works-only-with-sudo

jenswegar avatar Oct 27 '18 13:10 jenswegar

running "sudo docker-machine create default" instead of "docker-machine create default" solved my problem on Ubuntu 18.04

EDIT: If you do not want to use "sudo" every time you access Docker, read this post. It worked on my machine

dios231 avatar Nov 07 '18 14:11 dios231

If you're still having this problem a solution that worked on my machine was to switch shell, i was using zsh and for some reason switching to bash changed the error. The new error was: Error checking if host exists: stat /home/user/.docker/machine/machines/default: permission denied and by that point all i had to do was delete the ~/.docker folder (with root) and then i could run the create command without sudo. This recreated the ~/.docker folder this time owned by my default user. Another wierd thing is that deleting the docker folder and running docker-machine create ... from zsh would not work in anycase.

krishanmarco avatar Dec 04 '18 17:12 krishanmarco

Solved for me by adding myself to docker group ( https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user ):

sudo usermod -aG docker $USER

Restarting PC and running again.

gear54rus avatar Dec 11 '18 05:12 gear54rus

I'm using

Ubuntu 18.04.1 LTS

just running:

base=https://github.com/docker/machine/releases/download/v0.16.0 && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine && sudo install /tmp/docker-machine /usr/local/bin/docker-machine

Then:

sudo docker-machine create --driver virtualbox default

Reference from:

darkiosys avatar Dec 26 '18 10:12 darkiosys

@darkiosys approach worked for me ! Thanks a lot man

AleksandarTokarev avatar Feb 08 '19 15:02 AleksandarTokarev

In order to work with docker-machine on Ubuntu 18.04, you need to install the VirtualBox: Step1: sudo add-apt-repository multiverse && sudo apt-get update Step2: sudo apt-get install virtualbox Step3: Download the Docker Machine binary and extract it to your PATH: base=https://github.com/docker/machine/releases/download/v0.16.0 && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine && sudo install /tmp/docker-machine /usr/local/bin/docker-machine Step4: sudo docker-machine create --driver virtualbox default or docker-machine create node1 (creates a node named node1. Similarly, to create additional nodes by providing a different names (node2/3)

hope this helps!

VinayMakam avatar Feb 11 '19 10:02 VinayMakam

for me helped just installing docker-machine from here https://github.com/docker/machine/releases/ no other steps were required

atay avatar Mar 11 '19 19:03 atay

I think it's important to note:

  1. Remove docker, installed via snap: sudo snap remove docker.
  2. Install docker-machine with official instructions: https://docs.docker.com/machine/install-machine/

wapmorgan avatar Mar 26 '19 15:03 wapmorgan

Removing the v0.15.0 installation that snap installs and then manually installing v0.16.0 fixes it.

mm-devop avatar Mar 30 '19 15:03 mm-devop

@darkiosys your approach worked for me too :) on ubuntu 18.04

xnikotecx avatar Apr 17 '19 10:04 xnikotecx

I'm having the same issue on 18.04. VBoxMange is not found but its in my path.

ralyodio avatar May 02 '19 17:05 ralyodio

I am facing the issue while installing minikube in Centos 7

minikube start o minikube v1.0.1 on linux (amd64) @ Downloading Minikube ISO ... 142.88 MB / 142.88 MB [============================================] 100.00% 0s $ Downloading Kubernetes v1.14.1 images in the background ...

Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...

! Unable to start VM X Error: [VBOX_NOT_FOUND] create: precreate: VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path

onclick360-blog avatar May 08 '19 06:05 onclick360-blog

I've been having the same "VBoxManage is not found but its in my path." message after my docker and virtualbox installation on Ubuntu 18.04.2, I solved by restarting the PC, after that everything worked fine.

jvas28 avatar May 09 '19 07:05 jvas28

found this one very useful without installing VBoxManage and stuff https://stackoverflow.com/a/42419979/5598315

noiseorigin avatar May 14 '19 03:05 noiseorigin

I'm on linux. That is for mac.

On Mon, May 13, 2019 at 8:36 PM Shuyu Zhang [email protected] wrote:

found this one very useful without installing VBoxManage and stuff https://stackoverflow.com/a/42419979/5598315

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/docker/machine/issues/4590?email_source=notifications&email_token=AAAGV5MMJFF625MVUQJAYJTPVIXSRA5CNFSM4F3MDEO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVKFLKY#issuecomment-492066219, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAGV5KOFTHE6INVH6EJJTTPVIXSRANCNFSM4F3MDEOQ .

-- Anthony Ettinger http://anthony.ettinger.name [email protected] +1 (831) 406-1123

ralyodio avatar May 14 '19 03:05 ralyodio

Any progress on this ?? actually for linux ,there is no need to install docker machine. And how VboxManage will be in the path??

vipul1298 avatar May 25 '19 04:05 vipul1298

If you used snap to install docker, This worked for me. snap start docker you might need to use sudo. After that, i was able to use docker-compose without issues.

ioluwayo avatar Jul 03 '19 15:07 ioluwayo

In order to work with docker-machine on Ubuntu 18.04, you need to install the VirtualBox: Step1: sudo add-apt-repository multiverse && sudo apt-get update Step2: sudo apt-get install virtualbox Step3: Download the Docker Machine binary and extract it to your PATH: base=https://github.com/docker/machine/releases/download/v0.16.0 && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine && sudo install /tmp/docker-machine /usr/local/bin/docker-machine Step4: sudo docker-machine create --driver virtualbox default or docker-machine create node1 (creates a node named node1. Similarly, to create additional nodes by providing a different names (node2/3)

hope this helps!

Thanks .. i had this issue in Ubuntu 19.04 and followed this steps and now its resolved

sgmoorthy avatar Aug 04 '19 11:08 sgmoorthy

I'm using

Ubuntu 18.04.1 LTS

just running:

base=https://github.com/docker/machine/releases/download/v0.16.0 && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine && sudo install /tmp/docker-machine /usr/local/bin/docker-machine

Then:

sudo docker-machine create --driver virtualbox default

Reference from:

this this

works fine for me on 18.04, but now the vm is created under sudo, not working when I try to get rid of sudo.

YinYangOfDao avatar Aug 12 '19 23:08 YinYangOfDao

I'm using

Ubuntu 18.04.1 LTS

just running:

base=https://github.com/docker/machine/releases/download/v0.16.0 && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine && sudo install /tmp/docker-machine /usr/local/bin/docker-machine

Then:

sudo docker-machine create --driver virtualbox default

Reference from:

work for me

mico0502 avatar Feb 19 '20 17:02 mico0502

Follow these steps (worked on Ubuntu 18.04 server): 1- sudo add-apt-repository multiverse && sudo apt update 2- sudo apt install virtualbox Don't test it in a server, the server has no 'X display'. Then, after installing 'virtualbox' run the docker command: 3- docker-machine create -d virtualbox 'your-virtualbox-name' If run successfully should see something like this:

(your-virtualbox-name) Image cache directory does not exist, creating it at /your-path/.docker/machine/cache...
(your-virtualbox-name) No default Boot2Docker ISO found locally, downloading the latest release...
(your-virtualbox-name) Latest release for github.com/boot2docker/boot2docker is v19.03.5
(your-virtualbox-name) Downloading /your-path/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v19.03.5/boot2docker.iso...
(your-virtualbox-name) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
Creating machine...
...
...

atbraoy avatar Feb 22 '20 15:02 atbraoy