{"record":{"id":"8e858832a806d32f","repo":"hashicorp/vagrant","slug":"the-box-name-v-version-with-provider-p","errorCode":null,"errorMessage":"The box '%{name}' (v%{version}) with provider '%{provider}'\ncould not be found. Please double check and try again. You\ncan see all the boxes that are installed with `vagrant box list`.","messagePattern":"The box '%(.+?)' \\(v%(.+?)\\) with provider '%(.+?)'\ncould not be found\\. Please double check and try again\\. You\ncan see all the boxes that are installed with `vagrant box list`\\.","errorType":"exception","errorClass":"Vagrant::Errors::BoxNotFoundWithProviderAndVersion","httpStatus":null,"severity":"error","filePath":"plugins/commands/box/command/repackage.rb","lineNumber":29,"sourceCode":"      class Repackage < Vagrant.plugin(\"2\", :command)\n        def execute\n          opts = OptionParser.new do |o|\n            o.banner = \"Usage: vagrant box repackage <name> <provider> <version>\"\n          end\n\n          # Parse the options\n          argv = parse_options(opts)\n          return if !argv\n          raise Vagrant::Errors::CLIInvalidUsage, help: opts.help.chomp if argv.length != 3\n\n          box_name     = argv[0]\n          box_provider = argv[1].to_sym\n          box_version  = argv[2]\n\n          # Verify the box exists that we want to repackage\n          box = @env.boxes.find(box_name, box_provider, \"= #{box_version}\")\n          if !box\n            raise Vagrant::Errors::BoxNotFoundWithProviderAndVersion,\n              name: box_name,\n              provider: box_provider.to_s,\n              version: box_version\n          end\n\n          # Repackage the box\n          output_name = @env.vagrantfile.config.package.name || \"package.box\"\n          output_path = Pathname.new(File.expand_path(output_name, FileUtils.pwd))\n          box.repackage(output_path)\n\n          # Success, exit status 0\n          0\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/box/command/repackage.rb#L11-L47","documentation":"Raised by `vagrant box repackage` after argument parsing when `@env.boxes.find(box_name, box_provider, \"= #{box_version}\")` returns nil - no installed box matches the exact name/provider/version triple. The lookup pins the version with an exact `= version` Gem constraint, so an approximate or differently-formatted version string fails even if the box exists at another version.","triggerScenarios":"`vagrant box repackage ubuntu/jammy virtualbox 1.0.0` when the installed version is 202303.0.0; a provider that does not match the installed one; the box simply not installed at all.","commonSituations":"Guessing the version instead of copying it from `vagrant box list`; using 'latest' or a partial version; case mismatch in the box slug (owner/name).","solutions":["Run `vagrant box list` and copy the exact name, provider, and version shown","Retry repackage with that exact triple","If the box is missing, add it first with `vagrant box add`"],"exampleFix":"# before\nvagrant box repackage ubuntu/jammy virtualbox 1.0.0\n# error: box not found with provider and version\n\n# after\nvagrant box list   # shows ubuntu/jammy (virtualbox, 202303.0.0)\nvagrant box repackage ubuntu/jammy virtualbox 202303.0.0","handlingStrategy":"validation","validationCode":"# bash: confirm the exact triple exists before repackaging\nvagrant box list | grep \"^${BOX} \" | grep -q \"${PROVIDER}\" | grep -q \"${VERSION}\" ||\n  { echo \"box not installed: ${BOX} ${PROVIDER} ${VERSION}\"; vagrant box list; exit 1; }","typeGuard":"# Ruby: same lookup the command uses, as a predicate\ndef box_installed?(env, name, provider, version)\n  !env.boxes.find(name, provider.to_sym, \"= #{version}\").nil?\nend","tryCatchPattern":"begin\n  box.repackage(output_path)\nrescue Vagrant::Errors::BoxNotFoundWithProviderAndVersion => e\n  warn \"installed boxes: #{env.boxes.all.map(&:first).uniq.join(', ')}\"\n  raise\nend","preventionTips":["Never hand-type versions; source them from `vagrant box list` output","In scripts, fail fast if the exact (name, provider, version) line is absent","Add the box before repackaging on a fresh machine"],"tags":["box","repackage","version","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}