Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

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

Open
pramodachar opened this issue Oct 14, 2018 · 38 comments

Comments

@pramodachar
Copy link

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

@codemasternode
Copy link

I have the same issue on my Ubuntu 18.04

@gityopie
Copy link

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

@ajones
Copy link

ajones commented Oct 22, 2018

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

@awuceres
Copy link

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

@michaelborn
Copy link

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

@James-Gilbert-
Copy link

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

@pramodachar
Copy link
Author

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)

@James-Gilbert-
Copy link

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.

@jenswegar
Copy link

jenswegar commented Oct 27, 2018

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

@dios231
Copy link

dios231 commented Nov 7, 2018

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

@krishanmarco
Copy link

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.

@gear54rus
Copy link

gear54rus commented Dec 11, 2018

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.

@darkiosys
Copy link

darkiosys commented Dec 26, 2018

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:

@AleksandarTokarev
Copy link

@darkiosys approach worked for me ! Thanks a lot man

@VinayMakam
Copy link

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!

@atay
Copy link

atay commented Mar 11, 2019

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

@wapmorgan
Copy link

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/

@mm-devop
Copy link

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

@xnikotecx
Copy link

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

@ralyodio
Copy link

ralyodio commented May 2, 2019

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

@onclick360-blog
Copy link

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

@jvas28
Copy link

jvas28 commented May 9, 2019

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.

@noiseorigin
Copy link

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

@ralyodio
Copy link

ralyodio commented May 14, 2019 via email

@vipul1298
Copy link

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

@ioluwayo
Copy link

ioluwayo commented Jul 3, 2019

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.

@sgmoorthy
Copy link

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

@YinYangOfDao
Copy link

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.

@mico0502
Copy link

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

@atbraoy
Copy link

atbraoy commented Feb 22, 2020

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...
...
...

@Vibpositive
Copy link

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

Can confirm that it works on Ubuntu Desktop 19.10

@kamal-github
Copy link

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

I resolve the issue with

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

@Oskang09
Copy link

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

I resolve the issue with

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

For ubuntu 20.04 lts fixed with this too.

@Geobm
Copy link

Geobm commented Jul 22, 2020

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

Thanks @James-Gilbert- , it worked perfectly on Ubuntu 18.04.1. Nevertheless, every time I open a new terminal a request is sent to the docker container due to the step 4. More precisely the docker-machine-prompt.bash file is called and the docker-machine shell prompt opens. How can I prevent this without removing actual/working configuration? My solution as far was to comment the lines from docker-machine-prompt.bash as follows:

#base=https://raw.githubusercontent.com/docker/machine/v0.16.0
#for i in docker-machine-prompt.bash docker-machine-wrapper.bash docker-machine.bash
#do
#  sudo wget "$base/contrib/completion/bash/${i}" -P /etc/bash_completion.d
#done

Note: if docker-machine shell prompt is not expected, I comment the lines. But when I need to work with VBox It is useless to repeat the process every time a new terminal is opened.

Since this is poorly solved, any suggestion will be appreciated.

@sakthivelj
Copy link

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)

working I solve trying above setup. reboot system then try to create sudo docker-machine create --driver virtualbox default

$ sudo docker-machine create --driver virtualbox default Creating CA: /home/tyrebot/.docker/machine/certs/ca.pem Creating client certificate: /home/tyrebot/.docker/machine/certs/cert.pem Running pre-create checks... (default) Image cache directory does not exist, creating it at /home/tyrebot/.docker/machine/cache... (default) No default Boot2Docker ISO found locally, downloading the latest release... (default) Latest release for github.com/boot2docker/boot2docker is v19.03.12 (default) Downloading /home/tyrebot/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso... (default) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100% Creating machine... (default) Copying /home/tyrebot/.docker/machine/cache/boot2docker.iso to /home/tyrebot/.docker/machine/machines/default/boot2docker.iso... (default) Creating VirtualBox VM... (default) Creating SSH key... (default) Starting the VM... (default) Check network to re-create if needed... (default) Found a new host-only adapter: "vboxnet0" (default) Waiting for an IP... Waiting for machine to be running, this may take a few minutes... Detecting operating system of created instance... Waiting for SSH to be available... Detecting the provisioner... Provisioning with boot2docker... Copying certs to the local machine directory... Copying certs to the remote machine... Setting Docker configuration on the remote daemon... Checking connection to Docker... Docker is up and running! To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env default

@Devilla
Copy link

Devilla commented Jan 2, 2021

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

You must be a mac user.

@auvipy
Copy link

auvipy commented Feb 25, 2021

asif@ck ~> docker-machine create -d virtualbox dev;
Running pre-create checks...
Error with pre-create check: "VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path"
asif@ck ~ [3]> which VirtualBox
/usr/bin/VirtualBox
asif@ck ~> which VBoxManage
/usr/bin/VBoxManage
asif@ck ~>

ubuntu 20.04

@aghArdeshir
Copy link

In my case the problem was that I had installed the virtualbox via apt and docker via snap. I removed docker via snap and reinstalled it using apt;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests