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

The box '%{name}' for the provider '%{provider}' isn't insta

Error message

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

%{architectures}

What it means

Raised by `vagrant box update` when --architecture is passed but that architecture is not among the ones installed for the resolved provider and newest version (`!architecture_list.include?(architecture)`). The message lists the architectures actually installed for that version so the correct value can be chosen.

Source

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

              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
          elsif !architecture_list.include?(architecture)
            raise Vagrant::Errors::BoxNotFoundWithProviderArchitecture,
              name: name.to_s,
              provider: provider.to_s,
              version: version.to_s,
              architecture: architecture,
              architectures: architecture_list.sort.join(", ")
          end

          # Architecture gets cast to a string when collecting information
          # above. Convert it back to a nil if it's empty
          architecture = nil if architecture.to_s.empty?

          box = @env.boxes.find(name, provider, version, architecture)
          box_update(box, "> #{version}", @env.ui, download_options, force)
        end

        def update_vms(argv, provider, download_options, force)
          machines = {}

View on GitHub (pinned to 35f3160f4a)

Solutions

  1. Use one of the architectures listed in the message (e.g. amd64 or arm64)
  2. If you need a different architecture, add the box for it first with `vagrant box add`
  3. Check `uname -m` and the box catalog page for supported architecture names

Example fix

# before
vagrant box update --box mybox --provider virtualbox --architecture i386
# error: architecture 'i386' not installed; installed: amd64, arm64

# after
vagrant box update --box mybox --provider virtualbox --architecture arm64
Defensive patterns

Strategy: validation

Validate before calling

# bash: only pass architectures actually installed (shown by vagrant box list)
ARCH=${ARCH:-$(uname -m)}
vagrant box list | grep "^$BOX " | grep "$PROVIDER" | grep -q "$ARCH" ||
  { echo "$ARCH not installed for $BOX/$PROVIDER - pick from:"; vagrant box list | grep "^$BOX "; exit 1; }

Prevention

When it happens

Trigger: `vagrant box update --box mybox --provider virtualbox --architecture i386` when only amd64 and arm64 are installed; passing an arch string that differs in case or spelling from the stored value.

Common situations: Porting scripts from x86-only to ARM hosts; assuming a 32-bit variant exists; arch naming mismatches (x86_64 vs amd64).

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/9a3c52a785e3cca4. Report an issue: GitHub.