{"record":{"id":"c1a064d15dc693f0","repo":"hashicorp/vagrant","slug":"you-requested-to-update-the-box-name-this-bo","errorCode":null,"errorMessage":"You requested to update the box '%{name}'. This box has\nmultiple providers. You must explicitly select a single\nprovider to update with `--provider`.","messagePattern":"You requested to update the box '%(.+?)'\\. This box has\nmultiple providers\\. You must explicitly select a single\nprovider to update with `--provider`\\.","errorType":"exception","errorClass":"Vagrant::Errors::BoxUpdateMultiProvider","httpStatus":null,"severity":"error","filePath":"plugins/commands/box/command/update.rb","lineNumber":77,"sourceCode":"          0\n        end\n\n        def update_specific(name, provider, architecture, download_options, force)\n          box_info = Vagrant::Util::HashWithIndifferentAccess.new\n          @env.boxes.all.each do |box_name, box_version, box_provider, box_architecture|\n            next if name != box_name\n            box_info[box_provider] ||= Vagrant::Util::HashWithIndifferentAccess.new\n            box_info[box_provider][box_version] ||= []\n            box_info[box_provider][box_version].push(box_architecture.to_s).uniq!\n          end\n\n          if box_info.empty?\n            raise Vagrant::Errors::BoxNotFound, name: name.to_s\n          end\n\n          if !provider\n            if box_info.size > 1\n              raise Vagrant::Errors::BoxUpdateMultiProvider,\n                name: name.to_s,\n                providers: box_info.keys.map(&:to_s).sort.join(\", \")\n            end\n\n            provider = box_info.keys.first\n          elsif !box_info[provider]\n            raise Vagrant::Errors::BoxNotFoundWithProvider,\n              name: name.to_s,\n              provider: provider.to_s,\n              providers: box_info.keys.map(&:to_s).sort.join(\", \")\n          end\n\n          version = box_info[provider].keys.sort_by{ |v| Gem::Version.new(v) }.last\n          architecture_list = box_info[provider][version]\n\n          if !architecture\n            if architecture_list.size > 1\n              raise Vagrant::Errors::BoxUpdateMultiArchitecture,","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/box/command/update.rb#L59-L95","documentation":"Raised by `vagrant box update --box <name>` when the box is installed for more than one provider and no --provider flag was given. After building box_info (a hash keyed by provider -> versions -> architectures), an update would be ambiguous, so Vagrant refuses to pick a provider for you; the message lists the installed providers, sorted.","triggerScenarios":"`vagrant box update --box mybox` where mybox is installed for e.g. both virtualbox and vmware_desktop; box_info.size > 1 with no --provider flag.","commonSituations":"Teams sharing a Vagrantfile across host platforms; boxes mirrored across providers; scripts written against a single-provider setup later run on multi-provider installs.","solutions":["Add --provider matching one of the listed names: `vagrant box update --box mybox --provider virtualbox`","Check `vagrant box list` to see which providers are installed for the box","Pin the provider in automation scripts to keep updates deterministic"],"exampleFix":"# before\nvagrant box update --box mybox\n# error: multiple providers, must select one\n\n# after\nvagrant box update --box mybox --provider virtualbox","handlingStrategy":"validation","validationCode":"# bash: require --provider when the box spans multiple providers\nproviders=$(vagrant box list | awk -v b=\"$BOX\" '$1==b {gsub(/[(),]/,\"\",$2); print $2}' | sort -u)\nif [ \"$(printf '%s\\n' \"$providers\" | wc -l)\" -gt 1 ]; then\n  [ -n \"$PROVIDER\" ] || { echo \"box $BOX has multiple providers: $providers\"; exit 1; }\n  vagrant box update --box \"$BOX\" --provider \"$PROVIDER\"\nelse\n  vagrant box update --box \"$BOX\"\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass --provider in shared/CI update scripts for determinism","Check `vagrant box list` for duplicated names across providers before scripting updates","Standardize the team on one provider per project Vagrantfile where possible"],"tags":["box","update","provider","ambiguity"],"backgroundTag":"ambiguous-resource-selection","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}