Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to fix the provider used by Vagrant?

When using Vagrant I can specify other providers by using the --provider argument. Alas, this is quite tedious if you have to type it again and again:

$ vagrant up --provider vmware-fusion

Is there a possibility to configure once that vagrant should always use the given provider, unless I specify something else?

like image 602
Golo Roden Avatar asked Jan 28 '26 08:01

Golo Roden


1 Answers

You can set the VAGRANT_DEFAULT_PROVIDER environment variable (docs). For example in .profile or alike:

export VAGRANT_DEFAULT_PROVIDER="vmware_fusion"

If you want to set it for a specific project, you should be able to set it in Vagrantfile:

ENV['VAGRANT_DEFAULT_PROVIDER'] = "vmware_fusion"

Vagrant.configure('2') do |config|
  # ...
end

The provider can be overridden with the CLI option.

like image 139
tmatilai Avatar answered Jan 31 '26 00:01

tmatilai