Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant can find 'virtualbox', but not 'VirtualBox'. #5189

Closed
GeorgeMac opened this issue Jan 15, 2015 · 23 comments · Fixed by #5334
Closed

Vagrant can find 'virtualbox', but not 'VirtualBox'. #5189

GeorgeMac opened this issue Jan 15, 2015 · 23 comments · Fixed by #5334

Comments

@GeorgeMac
Copy link

I could be doing something really stupid. However, I keep getting this issue. Even with fresh installs of both vagrant and virtual box.
When I vagrant up, vagrant chooses to use virtualbox initially as a provider. It imports the base box, sorts out NATs, port forwarding... blah blah blah. Then I get the following error as it tries to provision:

The provider 'VirtualBox' could not be found, but was requested to
back the machine 'default'. Please use a provider that exists.

I then try vagrant destroy and get the same error message. Even with vagrant ssh I get this error message. However, if I use vagrant global-status and get the vm id; I can explicitly vagrant destroy <id> or vagrant ssh <id>.
This is a pain as every time I vagrant up it gets as far as provisioning with ansible and then fails because it is looking for a slightly different provider.

I am running on OS X Yosemite if that helps as well. I am sure I have just messed up set up somehow.

@davebirch
Copy link

May be a silly question, but do you have a vm.provider block in the
Vagrantfile used for the environment you're seeing issues with, and have
you specified the provider in this block as "VirtualBox" rather than
"virtualbox"?

I might be misreading your message, does this happen for all Vagrant
instances, or just a specific file?

On 15 January 2015 at 12:21, George notifications@github.com wrote:

I could be doing something really stupid. However, I keep getting this
issue. Even with fresh installs of both vagrant and virtual box.
When I vagrant up, vagrant chooses to use virtualbox initially as a
provider. It imports the base box, sorts out NATs, port forwarding... blah
blah blah. Then I get the following error as it tries to provision:

The provider 'VirtualBox' could not be found, but was requested to
back the machine 'default'. Please use a provider that exists.

I then try vagrant destroy and get the same error message. Even with vagrant
ssh I get this error message. However, if I use vagrant global-status and
get the vm id; I can explicitly vagrant destroy or vagrant ssh .
This is a pain as every time I vagrant up it gets as far as provisioning
with ansible and then fails because it is looking for a slightly different
provider.

I am running on OS X Yosemite if that helps as well. I am sure I have just
messed up set up somehow.


Reply to this email directly or view it on GitHub
#5189.

@GeorgeMac
Copy link
Author

Just had a check. The provider is set to virtualbox lower-case. I tried with upper-case and I get the same problem :S

@GeorgeMac
Copy link
Author

I'll look for another project to try it with :)

@GeorgeMac
Copy link
Author

There must be something wrong with my Vagrantfile. Everything worked fine when I built vagrant project itself. I will keep looking, this is someone else project who has left our company. I'll close this issue :) Thanks @davebirch

@legal90
Copy link
Contributor

legal90 commented Feb 1, 2015

@GeorgeMac have you figured out what was wrong in your Vagrantfile?

We got the similar error report for parallels provider from one of our customers. He is using the valid Vagrantfile (with provider mentioned in lower case) and initial "vagrant up" is successful. But after that he get the same error about provider in capitalized notation:

The provider 'Parallels' could not be found, but was requested to
back the machine 'default'. Please use a provider that exists.

@hitsthings
Copy link

I'm also seeing this (on Windows 8.1). I can't destroy the machine either because the provider isn't recognized.

@legal90
Copy link
Contributor

legal90 commented Feb 12, 2015

@hitsthings Just look at this folder, located in your current working directory: .vagrant/machines/<machine_name>/VirtualBox, and try to rename in to lower case .vagrant/machines/<machine_name>/virtualbox , so it should fix an issue for you.

@legal90
Copy link
Contributor

legal90 commented Feb 12, 2015

I've figured out how to reproduce this issue on OS X: (the provider doesn't make sense)

  1. Switch to any empty folder:
mkdir /empty_folder
cd /empty_folder
  1. Init new Vagrant environment:
vagrant init chef/ubuntu-14.10
  1. Try to run it with making a mistake in the case of provider name:
vagrant up --provider=VirtualBox

You will see the valid message, telling that this provider does not exists.

  1. Fix your mistake and run the command correctly:
vagrant up --provider=virtualbox

The VM will be upped successfully, but there still be wrong data directory for it: .vagrant/machines/<machine_name>/VirtualBox

  1. Now try to execute some subsequent command and see that it will be failed:
$ vagrant ssh

The provider 'VirtualBox' could not be found, but was requested to
back the machine 'default'. Please use a provider that exists.

@legal90
Copy link
Contributor

legal90 commented Feb 12, 2015

I've also provided a workaround here: GH-5334

@501st-alpha1
Copy link

I can confirm that the steps provided by @legal90 to reproduce the problem are also valid on Windows. After I deleted the .vagrant folder and the VM, vagrant up (the --provider=virtualbox is implied by my Vagrantfile) worked correctly.

@brunowego
Copy link

Thanks @legal90, only need rename folder!

@gvlekke
Copy link

gvlekke commented Aug 21, 2015

501st-alpha1 helps 👍

@Midnight-Coder
Copy link

@501st-alpha1 thanks 👍

@joelcormack
Copy link

@legal90 thank you, renaming the folder fixed it for me too

@cristianmartinez
Copy link

@legal90 Renaming the folder fixed it for me, thanks!

@andreipaz
Copy link

@legal90 Renaming the folder fixed it for me, thanks! (2)

@prayagupa
Copy link

prayagupa commented Sep 14, 2016

facing same issue with windows 7 while virtualbox 5.1.6 is up and running. vagrant is 1.8.0

vagrant_lowercase

vagrant

Virtualization is also enabled.
img_20160914_182537

Well, VirtualBox 1.4.0 works well. F$%#

@Nurdok
Copy link

Nurdok commented Oct 7, 2016

I got the same problem @prayagupd reports, but with vagrant 1.8.1 and Windows 10 (so I can't use a previous version of VirtualBox).

@DrewRay
Copy link

DrewRay commented Feb 13, 2017

same problem running on mac OS

$ vagrant --version
Vagrant 1.9.1
$ vboxmanage --version
5.0.32r112930

after reading this i removed the .vagrant directory and everything works fine again.

@gcbw
Copy link

gcbw commented Oct 13, 2017

Solution to this is to uninstall virtual box properly!

on windows and OSX, the steps are:

  1. Downloaded the LATEST version of virtual box
  2. Install it. (even if you think you already uninstalled, for example, deleting from Applications on OSX, you haven't! you can see by clicking the custom install button, you will see some components listed as "upgrade")
  3. After you install the new version (on windows, reboot), open the instaler and run the uninstall tool! (all still from the LATEST version of virtual box)
  4. now that you install+uninstall the latest version, run vagrant and let it install whatever it wants.

this will solve most of the off-topic mess discussed here.

@Romelhr9
Copy link

Romelhr9 commented Dec 23, 2017

For solve problem in windows, If you have another partition of disk with Linux operating system , install virtualbox in linux and vagrant, then set the environment variable with $ export VAGRANT_HOME=/home/yourname/virtuals, and install one version of any operating system, after that 1) copy from linux directory: .vagrant.d/.vagrant/machines/default/virtualbox to the windows partition in its directory named on environment variable VAGRANT_HOME, by example: set VAGRANT_HOME=D:\Virtual.vagrant.d and now the target directory is
%VAGRANT_HOME%.vagrant\machines\default\virtualbox 2) If the virtualbox in Linux is 5.1, then uninstall the Virtual box of windows 5.2 o greater to install Virtualbox 5.1 3) Run vagrant up but if the error now is the creater id is 1000 and you have id 0, then edit the file createror_uid to put the number 0. and agrin run vagrant up

@asseto
Copy link

asseto commented Mar 14, 2020

Hi,
how to find that folder to rename?

@ghost
Copy link

ghost commented Mar 15, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.