{"record":{"id":"7c1342e3eeaddf22","repo":"hashicorp/vagrant","slug":"ignoring-provider-config-for-validation","errorCode":null,"errorMessage":"Ignoring provider config for validation...","messagePattern":"Ignoring provider config for validation\\.\\.\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"plugins/kernel_v2/config/vm.rb","lineNumber":982,"sourceCode":"\n        # Validate clout_init_configs\n        @cloud_init_configs.each do |c|\n          error = c.validate(machine)\n          errors.concat error if !error.empty?\n        end\n\n        # We're done with VM level errors so prepare the section\n        errors = { \"vm\" => errors }\n\n        # Validate only the _active_ provider\n        if machine.provider_config\n          if !ignore_provider\n            provider_errors = machine.provider_config.validate(machine)\n            if provider_errors\n              errors = Vagrant::Config::V2::Util.merge_errors(errors, provider_errors)\n            end\n          else\n            machine.ui.warn(I18n.t(\"vagrant.config.vm.ignore_provider_config\"))\n          end\n        end\n\n        # Validate provisioners\n        @provisioners.each do |vm_provisioner|\n          if vm_provisioner.invalid?\n            name = vm_provisioner.name.to_s\n            name = vm_provisioner.type.to_s if name.empty?\n            errors[\"vm\"] << I18n.t(\"vagrant.config.vm.provisioner_not_found\",\n                                   name: name)\n            next\n          end\n\n          provisioner_errors = vm_provisioner.validate(machine, @provisioners)\n          if provisioner_errors\n            errors = Vagrant::Config::V2::Util.merge_errors(errors, provisioner_errors)\n          end\n","sourceCodeStart":964,"sourceCodeEnd":1000,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/kernel_v2/config/vm.rb#L964-L1000","documentation":"`vagrant validate -p / --ignore-provider` mocks all providers and skips provider-config validation (config/vm.rb passes ignore_provider through to validate). When a machine has provider config and validation runs in that mode, this notice is printed instead of validating those blocks; VM-level validation still runs normally.","triggerScenarios":"Running `vagrant validate --ignore-provider` on a Vagrantfile that contains `config.vm.provider \"...\"` blocks; ConfigValidate runs with env[:ignore_provider] set, taking the warn branch instead of calling machine.provider_config.validate.","commonSituations":"CI linting of Vagrantfiles on machines without any hypervisor installed; validating shared configs on developer laptops that lack the provider plugins.","solutions":["Treat it as informational — it only states that provider blocks were not validated in this run","Run `vagrant validate` without -p on a machine where the provider is installed for full validation","Run `vagrant up` or `vagrant status`, whose action chains always validate the active provider's config"],"exampleFix":"# before\nvagrant validate --ignore-provider   # warns when provider blocks exist\n# after\nvagrant validate                      # full validation when provider is installed","handlingStrategy":"validation","validationCode":"# Preflight: know whether the provider is usable before choosing validate mode\nvagrant plugin list | grep -i virtualbox || echo \"provider not installed; use --ignore-provider and expect the notice\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use --ignore-provider only in provider-less CI, and expect this notice there","Run full `vagrant validate` or `vagrant status` where the provider is installed","Treat the notice as scope information, not a config problem"],"tags":["vagrant","validate","provider-config","ci"],"backgroundTag":"validation-scope-warning","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}