It's a bit hacky, but since the Vagrantfile is just Ruby, you could set it there if you really wanted to…
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'vmware_fusion' That'd likely blow up if the user didn't have the vagrant-vmware-fusion plugin installed, so proceed with caution. On Wed, Jan 15, 2014 at 5:33 PM, Paul C <[email protected]> wrote: > Thankyou Mitchell, the env var is very useful > > If you're accepting feedback, it could be nice to have a way to run a script > prior to provisioning > So all the end user is concerned with is 'vagrant up', and the script can > perform any custom checks and set up any environment prior to provisioning > > > On Wednesday, 15 January 2014 17:54:37 UTC, Mitchell Hashimoto wrote: >> >> Paul, >> >> You can set `VAGRANT_DEFAULT_PROVIDER` env var to set your default >> provider. >> >> For now, this is by design, but in the future we'd like to make the >> process a bit smoother. >> >> Best, >> Mitchell >> >> >> On Tue, Jan 14, 2014 at 6:10 PM, Paul C <[email protected]> wrote: >>> >>> I am trying to set up a suite of vm's, which I want to only vmware_fusion >>> I had hoped that by setting config.vm.provider = "vmware_fusion" in my >>> Vagrantfile, I could create an instance simply with 'vagrant up' >>> >>> But each time it complains about VirtualBox, unless I also pass >>> provider=vmware_fusion on the commandline >>> The base box has a metadata.json containing only vmware_fusion, and my >>> Vagrantfile specifies vmware_fusion too. >>> >>> It seems like it would make more sense if vagrant could deduce that the >>> necessary provider is vmware_fusion, instead of pestering me with VirtualBox >>> messages and forcing me to specify provider on commandline. >>> >>> Is this by design, or a legacy issue from when vagrant was >>> VirtualBox-only? >>> >>> >>> >>> My config is like... >>> >>> config.vm.box = "centos6_minimal" >>> config.vm.provider = "vmware_fusion" >>> config.vm.box_url = >>> "http://url/vagrant-centos-6.4-x86_64-vmware_fusion.box" >>> >>> Granted, Its not a huge issue to pass it on cmdline, but Id like to >>> understand why its even necessary >>> >>> Thanks for any advice. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Vagrant" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> >>> For more options, visit https://groups.google.com/groups/opt_out. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
