{"record":{"id":"76df3699080fb6b0","repo":"hashicorp/vagrant","slug":"this-vagrant-environment-has-specified-that-it-req","errorCode":null,"errorMessage":"This Vagrant environment has specified that it requires the Vagrant\nversion to satisfy the following version requirements:\n\n  %{requirements}\n\nYou are running Vagrant %{version}, which does not satisfy\nthese requirements. Please change your Vagrant version or update\nthe Vagrantfile to allow this Vagrant version. However, be warned\nthat if the Vagrantfile has specified another version, it probably has\ngood reason to do so, and changing that may cause the environment to\nnot function properly.","messagePattern":"This Vagrant environment has specified that it requires the Vagrant\nversion to satisfy the following version requirements:\n\n  %(.+?)\n\nYou are running Vagrant %(.+?), which does not satisfy\nthese requirements\\. Please change your Vagrant version or update\nthe Vagrantfile to allow this Vagrant version\\. However, be warned\nthat if the Vagrantfile has specified another version, it probably has\ngood reason to do so, and changing that may cause the environment to\nnot function properly\\.","errorType":"exception","errorClass":"Vagrant::Errors::VagrantVersionBad","httpStatus":null,"severity":"warning","filePath":"lib/vagrant.rb","lineNumber":313,"sourceCode":"  #\n  # This should be specified at the _top_ of any Vagrantfile.\n  #\n  # Examples are shown below:\n  #\n  #   require_version(\">= 1.3.5\")\n  #   require_version(\">= 1.3.5\", \"< 1.4.0\")\n  #   require_version(\"~> 1.3.5\")\n  #\n  def self.require_version(*requirements)\n    logger = Log4r::Logger.new(\"vagrant::root\")\n    logger.info(\"Version requirements from Vagrantfile: #{requirements.inspect}\")\n\n    if version?(*requirements)\n      logger.info(\"  - Version requirements satisfied!\")\n      return\n    end\n\n    raise Errors::VagrantVersionBad,\n      requirements: requirements.join(\", \"),\n      version: VERSION\n  end\n\n  # This allows plugin developers to access the original environment before\n  # Vagrant even ran. This is useful when shelling out, especially to other\n  # Ruby processes.\n  #\n  # @return [Hash]\n  def self.original_env\n    {}.tap do |h|\n      ENV.each do |k,v|\n        if k.start_with?(\"VAGRANT_OLD_ENV\")\n          key = k.sub(/^VAGRANT_OLD_ENV_/, \"\")\n          if !key.empty?\n            h[key] = v\n          end\n        end","sourceCodeStart":295,"sourceCodeEnd":331,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant.rb#L295-L331","documentation":"Emitted by run_chef_client (chef_client.rb:74-77) right before building the chef-client command: 'Warning: Chef run list is empty. This may not be what you want.' Chef's run_list defaults to [] (plugins/provisioners/chef/config/base_runner.rb:64), so the warning fires whenever a chef_client provisioner converges with no add_recipe/add_role calls and no explicit chef.run_list. The chef-client run still executes against chef_server_url, so nothing fails; the guest simply receives no recipes from the Vagrant side. It can be legitimate when the node's run list is assigned on the Chef server (validator-based bootstrap).","triggerScenarios":"Running `vagrant up --provision` or `vagrant provision` with `config.vm.provision \"chef_client\"` whose block never calls `chef.add_recipe(...)` / `chef.add_role(...)` and never assigns `chef.run_list`; also triggered when Vagrantfile merging/overrides redefine the provisioner block without carrying the run list forward.","commonSituations":"Porting a chef_solo block to chef_client and forgetting to move the add_recipe lines; intentionally bootstrapping a node whose run list lives on the Chef server (warning is expected noise); stripping recipes out while debugging and never restoring them; a wrapper Vagrantfile overriding the provisioner config of an inner one.","solutions":["Add recipes/roles inside the provisioner block: chef.add_recipe \"apache2\" and chef.add_role \"web\".","Or assign the list wholesale: chef.run_list = [\"recipe[apache2]\", \"role[web]\"] so the check at chef_client.rb:75 sees a non-empty array.","If the Chef server assigns the run list (bootstrap via validation client), verify after provisioning with `knife node show <node_name> --run-list` and treat the warning as informational.","Inspect loaded Vagrantfiles (vagrant up --debug) for overrides that redefine the chef_client provisioner without the run list."],"exampleFix":"# Vagrantfile — before\nconfig.vm.provision \"chef_client\" do |chef|\n  chef.chef_server_url = \"https://chef.example.com/organizations/myorg\"\n  chef.validation_key_path = \"validator.pem\"\nend\n\n# after\nconfig.vm.provision \"chef_client\" do |chef|\n  chef.chef_server_url = \"https://chef.example.com/organizations/myorg\"\n  chef.validation_key_path = \"validator.pem\"\n  chef.add_recipe \"apache2\"\n  chef.add_role \"web\"\nend","handlingStrategy":"validation","validationCode":"# Vagrantfile — fail fast inside the provisioner block\nconfig.vm.provision \"chef_client\" do |chef|\n  chef.chef_server_url = \"https://chef.example.com/organizations/myorg\"\n  chef.add_recipe \"apache2\"\n  raise \"chef_client run_list is empty — nothing to converge\" if chef.run_list.empty?\nend","typeGuard":"# @param cfg [VagrantPlugins::Chef::Config::BaseRunner]\ndef chef_run_list_empty?(cfg)\n  cfg.run_list.nil? || cfg.run_list.empty?\nend","tryCatchPattern":null,"preventionTips":["Always add at least one add_recipe/add_role in every chef provisioner block, even in test Vagrantfiles.","When Vagrantfile layers override provisioners, re-verify the final config with `vagrant provision --debug` and grep for the empty run list.","For server-side run lists, document in the Vagrantfile that the warning is expected so teammates do not 'fix' it wrongly."],"tags":["chef","chef-client","vagrant","provisioning","run-list"],"backgroundTag":"chef-empty-run-list","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}