diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index 0ad8601e8..0647301d9 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -369,8 +369,8 @@ module Vagrant return key if impl.usable?(false) end - # If all else fails, return VirtualBox - return :virtualbox + # No providers available is a critical error for Vagrant. + raise Errors::NoDefaultProvider end # Returns the collection of boxes for the environment. diff --git a/lib/vagrant/errors.rb b/lib/vagrant/errors.rb index 7fb23da1d..6590eab2e 100644 --- a/lib/vagrant/errors.rb +++ b/lib/vagrant/errors.rb @@ -476,6 +476,10 @@ module Vagrant error_key(:nfs_client_not_installed_in_guest) end + class NoDefaultProvider < VagrantError + error_key(:no_default_provider) + end + class NoDefaultSyncedFolderImpl < VagrantError error_key(:no_default_synced_folder_impl) end diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 6acf81274..82e8ba051 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -861,6 +861,21 @@ en: If this message is erroneous, you may disable this check by setting `config.nfs.verify_installed` to `false` in your Vagrantfile. + no_default_provider: |- + 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. no_default_synced_folder_impl: |- No synced folder implementation is available for your synced folders! Please consult the documentation to learn why this may be the case.