tl;dr: Had Vbox5.1+, vagrant insisted on installing 5.0.1, and failed. I now removed all VBox instances from my system, but vagrant won't install it favourite version anymore. How to force vagrant to install vbox again?

I have a Vagrantfile that I want to use on a OSX host.

I already had VirtuaBox 5.1+ installed. And VBoxManage --version showed that 5.1+ version.

I installed vagrant and issued vagrant up. It parsed the Vagrantfile, download the vm image, and started to download and install VirtualBox 5.0.1. I tried to cancel, but it cancel the whole vagrant up command.

In summary, there was no way to avoid vagrant downloading VirtualBox, even though it already had access to 5.1+ i had in my system. So I let it proceed. It installed 5.0.1 over my 5.1+, and VBoxManage --version showed 5.0.1 just fine after that. yet, vagrant up failed claiming VirtualBox is not available. Since it showed a notice that on windows a restart is required, i restarted OSX too just to be safe. Because of that I lost the exact error message i was getting.

Now i tried to completely remove VirtualBox from my system. VBoxManage is nowhere to be found. rm -fr .vagrant ~/.vagrant.d from my Vagrantfile dir. But vagrant up now, instead of trying to download virtual box in such a stubborn manner as before, just fail saying it can't find virtual box.

Obviously it stored somewhere, that is not the documented .vagrant dir, that it already installed vbox and that it shouldn't to that again. Where is that information?

-- edit 1

I installed vbox 5.1.28 again. And after vagrant up, there it goes insisting on downloading 5.0.10 again. (which i recalled wrong as 5.0.1 before). Here is the previously lost error:

$ VBoxManage --version

$ vagrant up
==>  Provider 'virtualbox' not found. We'll automatically install it now...
     The installation process will start below. Human interaction may be
     required at some points. If you're uncomfortable with automatically
     installing this provider, you can safely Ctrl-C this process and install
     it manually.
==>  Downloading VirtualBox 5.0.10...
     This may not be the latest version of VirtualBox, but it is a version
     that is known to work well. Over time, we'll update the version that
     is installed.
==>  Installing VirtualBox. This will take a few minutes...
     You may be asked for your administrator password during this time.
     If you're uncomfortable entering your password here, please install
     VirtualBox manually.
[SUDO] Password:
==>  VirtualBox has successfully been installed!
No usable default provider could be found for your system.

Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.

The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.

If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.

$ VBoxManage --version

-- edit 2

vagrant site says that vbox 5.1 is supported:

The VirtualBox provider is compatible with VirtualBox versions 4.0.x, 4.1.x, 4.2.x, 4.3.x, 5.0.x, and 5.1.x.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.