{"record":{"id":"7c3235b0bbf9d073","repo":"hashicorp/vagrant","slug":"vagrant-provisioners-salt-bootstrap-failed","errorCode":null,"errorMessage":"vagrant.provisioners.salt.bootstrap_failed","messagePattern":"vagrant\\.provisioners\\.salt\\.bootstrap_failed","errorType":"exception","errorClass":"VagrantPlugins::Salt::Errors::SaltError","httpStatus":null,"severity":"error","filePath":"plugins/provisioners/salt/provisioner.rb","lineNumber":367,"sourceCode":"              if @config.verbose\n                @machine.env.ui.info(data.rstrip)\n              end\n            end\n          else\n            bootstrap = @machine.communicate.sudo(\"%s %s\" % [bootstrap_destination, options]) do |type, data|\n              if data[0] == \"\\n\"\n                # Remove any leading newline but not whitespace. If we wanted to\n                # remove newlines and whitespace we would have used data.lstrip\n                data = data[1..-1]\n              end\n              if @config.verbose\n                @machine.env.ui.info(data.rstrip)\n              end\n            end\n          end\n\n          if !bootstrap\n            raise Salt::Errors::SaltError, :bootstrap_failed\n          end\n\n          if configure and !install\n            @machine.env.ui.info \"Salt successfully configured!\"\n          elsif configure and install\n            @machine.env.ui.info \"Salt successfully configured and installed!\"\n          elsif !configure and install\n            @machine.env.ui.info \"Salt successfully installed!\"\n          end\n        else\n          @machine.env.ui.info \"Salt did not need installing or configuring.\"\n        end\n      end\n\n      def call_overstate\n        if @config.run_overstate\n          # If verbose is on, do not duplicate a failed command's output in the error message.\n          ssh_opts = {}","sourceCodeStart":349,"sourceCodeEnd":385,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/provisioners/salt/provisioner.rb#L349-L385","documentation":"SaltError with key :bootstrap_failed is raised at provisioner.rb:367 after the bootstrap script (bundled bootstrap_salt.sh / .ps1, or config.bootstrap_script) ran via communicate.sudo and returned falsy — i.e. the script exited non-zero. SaltError namespaces translations under vagrant.provisioners.salt, so the symbol resolves to the vagrant.provisioners.salt.bootstrap_failed locale key. It means Salt itself failed to install/configure inside the guest, not that Vagrant misbehaved.","triggerScenarios":"run_bootstrap_script uploads the script (get_bootstrap: custom bootstrap_script or BootstrapDownloader's platform default), executes it with sudo (powershell.exe -NonInteractive ... -file for WinRM), and raises when communicate.sudo reports failure: unresolvable config.version pin, no network/package mirrors in the guest, unsupported distro in the script, or a custom bootstrap_script exiting non-zero.","commonSituations":"Pinning salt version to a tag the bootstrap script cannot resolve; guests without internet or with broken apt/yum repos; custom bootstrap scripts with bugs; Windows bootstraps failing on Python pre-reqs; slow mirrors timing out.","solutions":["Re-run with --debug (and config.verbose = true) — the bootstrap output streamed just above the raise contains the real failing command (apt/yum/pip/curl)","Verify the guest has network access and working package repos before provisioning","If config.version is set, confirm that exact Salt version exists for the bootstrap script and guest platform","Point bootstrap_script at a known-good script, or omit it to use the bundled one","For WinRM guests, run the PowerShell bootstrap manually in the guest to expose the failing step"],"exampleFix":"# before\nconfig.vm.provision :salt do |s|\n  s.version = \"v3000.99-does-not-exist\"  # bootstrap exits non-zero -> bootstrap_failed\nend\n\n# after\nconfig.vm.provision :salt do |s|\n  s.version = \"3006\"\n  s.verbose = true  # stream bootstrap output so failures are diagnosable\nend","handlingStrategy":"try-catch","validationCode":"# Vagrantfile: smoke-test guest network before salt bootstrap runs\nconfig.vm.provision \"shell\",\n  inline: \"curl -fsSI https://repo.saltproject.io >/dev/null || (echo 'no network for salt bootstrap'; exit 1)\"","typeGuard":null,"tryCatchPattern":"begin\n  env.cli(\"provision\")\nrescue VagrantPlugins::Salt::Errors::SaltError => e\n  # bootstrap_failed: inspect the streamed sudo output above this point\n  abort \"Salt bootstrap failed inside the guest - re-run with --debug\"\nend","preventionTips":["Set s.verbose = true (or run with --debug) on first provision so bootstrap output is visible","Pin Salt versions the bundled bootstrap script supports","Keep salt package mirrors reachable; mirror them internally for offline CI","Test custom bootstrap_script manually in the guest before wiring it in"],"tags":["salt","bootstrap","provisioner","installation","guest"],"backgroundTag":"bootstrap-script-failed","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}