hashicorp/vagrant · error · Vagrant::Errors::ProviderNotFound

The provider '%{provider}' could not be found, but was reque

Error message

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

Vagrant knows about the following providers: %{providers}

What it means

Raised by VagrantFile#machine_config when the requested provider has no registered plugin at all and not even a case-insensitive match exists. The provider registry (Vagrant.plugin("2").manager.providers) only holds built-in providers (virtualbox, hyperv, docker, ...) plus installed plugins, so third-party providers must be installed first. The message lists every provider Vagrant currently knows about.

Source

Thrown at lib/vagrant/vagrantfile.rb:146

      provider_options = {}
      box_formats      = nil
      if provider != nil
        provider_plugin  = Vagrant.plugin("2").manager.providers[provider]
        if !provider_plugin && validate_provider
          providers  = Vagrant.plugin("2").manager.providers.to_hash.keys
          if providers
            providers_str = providers.join(', ')
          else
            providers_str = "N/A"
          end

          if providers.include? provider.downcase
            raise Errors::ProviderNotFoundSuggestion,
              machine: name, provider: provider,
              suggestion: provider.downcase, providers: providers_str
          end

          raise Errors::ProviderNotFound,
            machine: name, provider: provider, providers: providers_str
        end

        if validate_provider
          provider_cls     = provider_plugin[0]
          provider_options = provider_plugin[1]
          box_formats      = provider_options[:box_format] || provider

          # Test if the provider is usable or not
          begin
            provider_cls.usable?(true)
          rescue Errors::VagrantError => e
            raise Errors::ProviderNotUsable,
              machine: name.to_s,
              provider: provider.to_s,
              message: e.to_s
          end
        else

View on GitHub (pinned to 35f3160f4a)

Solutions

  1. Install the provider plugin: `vagrant plugin install vagrant-<provider>` (e.g. vagrant-libvirt, vagrant-vmware-desktop)
  2. Verify it is loaded with `vagrant plugin list`
  3. If installed but still not found, run with VAGRANT_LOG=debug to see the plugin load failure
  4. Otherwise switch to one of the providers listed in the message

Example fix

# before
vagrant up --provider=libvirt
# error: provider 'libvirt' could not be found

# after
vagrant plugin install vagrant-libvirt
vagrant up --provider=libvirt
Defensive patterns

Strategy: validation

Validate before calling

# bash: require the provider plugin before running vagrant up
vagrant plugin list | grep -q "^vagrant-$PROVIDER " ||
  vagrant plugin install "vagrant-$PROVIDER"

Type guard

# Ruby: check the provider registry before machine_config
REGISTRY = Vagrant.plugin('2').manager.providers.to_hash.keys.map(&:to_s)
def provider_registered?(name)
  REGISTRY.include?(name.to_s) || REGISTRY.include?(name.to_s.downcase)
end

Prevention

When it happens

Trigger: `vagrant up --provider=aws` (or libvirt, vmware, etc.) with the provider plugin gem absent; API calls to machine_config with an unregistered provider symbol while validate_provider is true.

Common situations: Third-party provider plugin (vagrant-libvirt, vagrant-aws, vagrant-vmware-desktop) not installed, or installed into a different Ruby/Vagrant installation than the one running; plugin fails to load silently at startup; plain typo in the provider name with no case-insensitive match.

Related errors


AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21). Data as JSON: /api/errors/69af13c8e9a17c6e. Report an issue: GitHub.