Use VirtualBox provider by default on Fedora 21

According to vagrant's documentation, the default provider should be virtualbox, and the VAGRANT_DEFAULT_PROVIDER variable lets you override it.

However, VAGRANT_DEFAULT_PROVIDER is empty, so it should be virtualbox, right? Well, if I set the variable to virtualbox, it works again. So I guess fedora sets the default variable somewhere else.

Solution:

$ echo "export VAGRANT_DEFAULT_PROVIDER=virtualbox" >> ~/.bashrc
$ source ~/.bashrc

This is just my experience on encountering this problem.

On executing vagrant up, i got this

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

I tried the commands provided above

echo "export VAGRANT_DEFAULT_PROVIDER=virtualbox" >> ~/.bashrc
source ~/.bashrc

Then I executed vagrant up

The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:

VirtualBox is complaining that the kernel module is not loaded. Please
run `VBoxManage --version` or open the VirtualBox GUI to see the error
message which should contain instructions on how to fix this error.

Using VBoxManage --version, it gave me

The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.0.4-303.fc22.x86_64) or it failed to
load. Please recompile the kernel module and install it

and prompted me to execute sudo /etc/init.d/vboxdrv setup which solved my problem.