{"record":{"id":"9611a1e00bbaf6e9","repo":"hashicorp/vagrant","slug":"installation-of-the-provider-provider-failed","errorCode":null,"errorMessage":"Installation of the provider '%{provider}' failed! The stdout\nand stderr are shown below. Please read the error output, resolve it,\nand try again. If problem persists, please install the provider\nmanually.\n\nStdout: %{stdout}\nStderr: %{stderr}","messagePattern":"Installation of the provider '%(.+?)' failed! The stdout\nand stderr are shown below\\. Please read the error output, resolve it,\nand try again\\. If problem persists, please install the provider\nmanually\\.\n\nStdout: %(.+?)\nStderr: %(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::ProviderInstallFailed","httpStatus":null,"severity":"error","filePath":"plugins/hosts/darwin/cap/provider_install_virtualbox.rb","lineNumber":53,"sourceCode":"\n          # Validate that the file checksum matches\n          actual = FileChecksum.new(path, Digest::SHA2).checksum\n          if actual != SHA256SUM\n            raise Vagrant::Errors::ProviderChecksumMismatch,\n              provider: \"virtualbox\",\n              actual: actual,\n              expected: SHA256SUM\n          end\n\n          # Launch it\n          ui.output(I18n.t(\n            \"vagrant.hosts.darwin.virtualbox_install_install\"))\n          ui.detail(I18n.t(\n            \"vagrant.hosts.darwin.virtualbox_install_install_detail\"))\n          script = File.expand_path(\"../../scripts/install_virtualbox.sh\", __FILE__)\n          result = Vagrant::Util::Subprocess.execute(\"bash\", script, path)\n          if result.exit_code != 0\n            raise Vagrant::Errors::ProviderInstallFailed,\n              provider: \"virtualbox\",\n              stdout: result.stdout,\n              stderr: result.stderr\n          end\n\n          ui.success(I18n.t(\"vagrant.hosts.darwin.virtualbox_install_success\"))\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":35,"sourceCodeEnd":65,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/hosts/darwin/cap/provider_install_virtualbox.rb#L35-L65","documentation":"Vagrant::Errors::ProviderInstallFailed is raised by the macOS VirtualBox auto-installer at plugins/hosts/darwin/cap/provider_install_virtualbox.rb:53. After the checksum check passes, Vagrant runs the bundled scripts/install_virtualbox.sh via `Vagrant::Util::Subprocess.execute(\"bash\", script, path)`; a non-zero exit raises with the script's stdout/stderr embedded verbatim. So the download was fine — the installation stage itself failed.","triggerScenarios":"`vagrant up` on macOS without VirtualBox; download and checksum succeed; the shell script exits non-zero — e.g. `hdiutil attach` cannot mount the dmg, the `installer` command rejects the package, or an environment variable breaks the script's assumptions.","commonSituations":"macOS version too old/new for that VirtualBox build; insufficient free disk space; Gatekeeper quarantine attribute on the package; kernel-extension approval prompts on modern macOS; script regressions in older Vagrant releases.","solutions":["Read the Stdout/Stderr in the error — the actually failing command inside install_virtualbox.sh is printed there","Install VirtualBox manually (download the .dmg from virtualbox.org, run the installer) so auto-install never runs","Confirm the macOS version is supported by that VirtualBox release and free disk space is adequate","Update Vagrant — install-script fixes ship with new releases"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"begin\n  provider_install.call\nrescue Vagrant::Errors::ProviderInstallFailed => e\n  warn \"auto-install failed:\\n#{e.data[:stderr]}\"\n  # fallback: point the user at the already-downloaded installer / manual install\n  raise unless manual_virtualbox_present? \nend","preventionTips":["Bake VirtualBox into team/CI machine images","Check free disk space and macOS compatibility before relying on auto-install","Update Vagrant alongside VirtualBox upgrades"],"tags":["virtualbox","provider-install","macos","subprocess","installer"],"backgroundTag":"installer-exit-nonzero","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}