hashicorp/vagrant · warning · Vagrant::Errors::BoxMetadataDownloadError
There was an error while downloading the metadata for this b
Error message
There was an error while downloading the metadata for this box.
The error message is shown below:
%{message} What it means
The identical empty-run_list warning in run_chef_zero (chef_zero.rb:57-61), emitted just before CommandBuilder.command(:client, ..., local_mode: true). chef_zero runs chef-client in local mode against an in-guest Chef Zero server, so the run list must come entirely from the Vagrantfile — an empty list (default [] per base_runner.rb:64) means a no-op converge. The command still executes, so the warning is the only hint that provisioning did nothing.
Source
Thrown at lib/vagrant/action/builtin/box_add.rb:146
if expanded && url.length == 1
is_error = is_metadata_results.find do |b|
b.is_a?(Errors::DownloaderError)
end
if is_error
raise Errors::BoxAddShortNotFound,
error: is_error.extra_data[:message],
name: env[:box_url],
url: url
end
end
is_error = is_metadata_results.find do |b|
b.is_a?(Errors::DownloaderError)
end
if is_error
raise Errors::BoxMetadataDownloadError,
message: is_error.extra_data[:message]
end
is_metadata = is_metadata_results.any? { |b| b === true }
if is_metadata && url.length > 1
raise Errors::BoxAddMetadataMultiURL,
urls: url.join(", ")
end
if is_metadata
url = [url.first, authed_urls.first]
add_from_metadata(url, env, expanded)
else
add_direct(authed_urls, env)
end
@app.call(env)
endView on GitHub (pinned to 35f3160f4a)
Solutions
- Add recipes/roles in the chef_zero block: chef.add_recipe "myapp" and chef.add_role "base".
- Or set chef.run_list = ["recipe[myapp]", "role[base]"] explicitly.
- Re-run `vagrant provision` and confirm the Chef output shows 'Running handlers' / recipes loaded rather than an instant exit.
Example fix
# Vagrantfile — before config.vm.provision "chef_zero" do |chef| chef.cookbooks_path = "cookbooks" end # after config.vm.provision "chef_zero" do |chef| chef.cookbooks_path = "cookbooks" chef.add_recipe "myapp" end
Defensive patterns
Strategy: validation
Validate before calling
# Vagrantfile — guard inside the chef_zero block config.vm.provision "chef_zero" do |chef| chef.cookbooks_path = "cookbooks" chef.add_recipe "myapp" raise "chef_zero run_list is empty — local mode has no server-side run list" if chef.run_list.empty? end
Type guard
def chef_run_list_empty?(cfg) cfg.run_list.nil? || cfg.run_list.empty? end
Prevention
- When converting blocks between chef_solo/chef_zero/chef_client, re-check the run list lines survived the edit.
- Pin the intent in code: fail the Vagrantfile load if a chef provisioner would converge nothing.
- Verify convergence in CI by asserting chef output contains at least one recipe name.
When it happens
Trigger: `vagrant provision` with `config.vm.provision "chef_zero"` whose block configures cookbooks_path/roles_path/data_bags_path etc. but never adds recipes or roles; or a run list that got emptied by config merging across Vagrantfiles.
Common situations: Migrating from chef_solo to chef_zero and dropping the add_recipe lines during the edit; assuming data bags or roles alone trigger convergence; overrides from a wrapper Vagrantfile discarding the inner block's run list.
Related errors
- This Vagrant environment has specified that it requires the
- Chef server provisioning requires that the `config.chef.vali
- The validation key set for `config.chef.validation_key_path`
- Chef server provisioning requires that the `config.chef.chef
- Chef never successfully completed! Any errors should be visi
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/6dfb15500f88f8a5.
Report an issue: GitHub.