{"record":{"id":"61922e085063f38d","repo":"hashicorp/vagrant","slug":"the-box-name-isn-t-installed-for-the-provider","errorCode":null,"errorMessage":"The box '%{name}' isn't installed for the provider '%{provider}'.\nPlease double-check and try again. The installed providers for\nthe box are shown below:\n\n%{providers}","messagePattern":"The box '%(.+?)' isn't installed for the provider '%(.+?)'\\.\nPlease double-check and try again\\. The installed providers for\nthe box are shown below:\n\n%(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::BoxNotFoundWithProvider","httpStatus":null,"severity":"error","filePath":"plugins/commands/box/command/update.rb","lineNumber":84,"sourceCode":"            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,\n                name: name.to_s,\n                provider: provider.to_s,\n                version: version.to_s,\n                architectures: architecture_list.sort.join(\", \")\n            end\n\n            architecture = architecture_list.first","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/box/command/update.rb#L66-L102","documentation":"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.","triggerScenarios":"`vagrant box update --box mybox --provider vmware_desktop` when mybox is only installed for virtualbox; typo in the provider flag.","commonSituations":"Switching host platforms and assuming the box is present for the new provider; scripts copying a provider flag from another project.","solutions":["Use one of the providers listed in the message","If you need the new provider, add the box for it: `vagrant box add <name> --provider <provider>`","Verify with `vagrant box list` which providers are installed"],"exampleFix":"# before\nvagrant box update --box mybox --provider vmware_desktop\n# error: not installed for provider; installed: virtualbox\n\n# after\nvagrant box update --box mybox --provider virtualbox\n# or add the missing provider first\nvagrant box add mybox --provider vmware_desktop","handlingStrategy":"validation","validationCode":"# bash: confirm the box is installed for the provider you pass\nvagrant box list | awk -v b=\"$BOX\" '$1==b {gsub(/[(),]/,\"\",$2); print $2}' | sort -u |\n  grep -qx \"$PROVIDER\" || { echo \"$BOX not installed for $PROVIDER\"; exit 1; }\nvagrant box update --box \"$BOX\" --provider \"$PROVIDER\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match the --provider value against `vagrant box list` before scripting updates","When adopting a new hypervisor, `vagrant box add` for that provider first","Treat the provider list in the error text as the source of truth, not memory"],"tags":["box","update","provider","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}