hashicorp/vagrant · error · Vagrant::Errors::ProviderInstallFailed

Installation of the provider '%{provider}' failed! The stdou

Error message

Installation of the provider '%{provider}' failed! The stdout
and stderr are shown below. Please read the error output, resolve it,
and try again. If problem persists, please install the provider
manually.

Stdout: %{stdout}
Stderr: %{stderr}

What it means

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.

Source

Thrown at plugins/hosts/darwin/cap/provider_install_virtualbox.rb:53

          # Validate that the file checksum matches
          actual = FileChecksum.new(path, Digest::SHA2).checksum
          if actual != SHA256SUM
            raise Vagrant::Errors::ProviderChecksumMismatch,
              provider: "virtualbox",
              actual: actual,
              expected: SHA256SUM
          end

          # Launch it
          ui.output(I18n.t(
            "vagrant.hosts.darwin.virtualbox_install_install"))
          ui.detail(I18n.t(
            "vagrant.hosts.darwin.virtualbox_install_install_detail"))
          script = File.expand_path("../../scripts/install_virtualbox.sh", __FILE__)
          result = Vagrant::Util::Subprocess.execute("bash", script, path)
          if result.exit_code != 0
            raise Vagrant::Errors::ProviderInstallFailed,
              provider: "virtualbox",
              stdout: result.stdout,
              stderr: result.stderr
          end

          ui.success(I18n.t("vagrant.hosts.darwin.virtualbox_install_success"))
        end
      end
    end
  end
end

View on GitHub (pinned to 35f3160f4a)

Solutions

  1. Read the Stdout/Stderr in the error — the actually failing command inside install_virtualbox.sh is printed there
  2. Install VirtualBox manually (download the .dmg from virtualbox.org, run the installer) so auto-install never runs
  3. Confirm the macOS version is supported by that VirtualBox release and free disk space is adequate
  4. Update Vagrant — install-script fixes ship with new releases
Defensive patterns

Strategy: fallback

Try / catch

begin
  provider_install.call
rescue Vagrant::Errors::ProviderInstallFailed => e
  warn "auto-install failed:\n#{e.data[:stderr]}"
  # fallback: point the user at the already-downloaded installer / manual install
  raise unless manual_virtualbox_present? 
end

Prevention

When it happens

Trigger: `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.

Common situations: 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.

Related errors


AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21). Data as JSON: /api/errors/9611a1e00bbaf6e9. Report an issue: GitHub.