Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top