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

The box ' ' isn't installed for the provider ' '. Please…

Error message

The box '%{name}' isn't installed for the provider '%{provider}'.
Please double-check and try again. The installed providers for
the box are shown below:

%{providers}

What it means

Raised by `vagrant box update --box <name> --provider <p>` when the box exists but is not installed for the requested provider (`!box_info[provider]`). The message lists the providers the box actually is installed for, sorted, so the mismatch is immediately visible.

Solutions

  1. Use one of the providers listed in the message
  2. If you need the new provider, add the box for it: `vagrant box add <name> --provider <provider>`
  3. Verify with `vagrant box list` which providers are installed

Example fix

# before
vagrant box update --box mybox --provider vmware_desktop
# error: not installed for provider; installed: virtualbox

# after
vagrant box update --box mybox --provider virtualbox
# or add the missing provider first
vagrant box add mybox --provider vmware_desktop
Defensive patterns

Strategy: validation

Validate before calling

# bash: confirm the box is installed for the provider you pass
vagrant box list | awk -v b="$BOX" '$1==b {gsub(/[(),]/,"",$2); print $2}' | sort -u |
  grep -qx "$PROVIDER" || { echo "$BOX not installed for $PROVIDER"; exit 1; }
vagrant box update --box "$BOX" --provider "$PROVIDER"

Prevention

When it happens

Trigger: `vagrant box update --box mybox --provider vmware_desktop` when mybox is only installed for virtualbox; typo in the provider flag.

Common situations: Switching host platforms and assuming the box is present for the new provider; scripts copying a provider flag from another project.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at plugins/commands/box/command/update.rb:84

            box_info[box_provider] ||= Vagrant::Util::HashWithIndifferentAccess.new
            box_info[box_provider][box_version] ||= []
            box_info[box_provider][box_version].push(box_architecture.to_s).uniq!
          end

          if box_info.empty?
            raise Vagrant::Errors::BoxNotFound, name: name.to_s
          end

          if !provider
            if box_info.size > 1
              raise Vagrant::Errors::BoxUpdateMultiProvider,
                name: name.to_s,
                providers: box_info.keys.map(&:to_s).sort.join(", ")
            end

            provider = box_info.keys.first
          elsif !box_info[provider]
            raise Vagrant::Errors::BoxNotFoundWithProvider,
              name: name.to_s,
              provider: provider.to_s,
              providers: box_info.keys.map(&:to_s).sort.join(", ")
          end

          version = box_info[provider].keys.sort_by{ |v| Gem::Version.new(v) }.last
          architecture_list = box_info[provider][version]

          if !architecture
            if architecture_list.size > 1
              raise Vagrant::Errors::BoxUpdateMultiArchitecture,
                name: name.to_s,
                provider: provider.to_s,
                version: version.to_s,
                architectures: architecture_list.sort.join(", ")
            end

            architecture = architecture_list.first

View on GitHub (pinned to 35f3160f4a)