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 raised at plugins/hosts/windows/cap/provider_install_virtualbox.rb:54. After the checksum passes, Vagrant runs the bundled scripts/install_virtualbox.ps1 with the downloaded file via Vagrant::Util::PowerShell; a non-zero exit raises with the script's stdout/stderr. The installer stage — not the download — failed.
Source
Thrown at plugins/hosts/windows/cap/provider_install_virtualbox.rb:54
# 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.windows.virtualbox_install_install"))
ui.detail(I18n.t(
"vagrant.hosts.windows.virtualbox_install_install_detail"))
script = File.expand_path("../../scripts/install_virtualbox.ps1", __FILE__)
result = Vagrant::Util::PowerShell.execute(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.windows.virtualbox_install_success"))
end
end
end
end
end
View on GitHub (pinned to 35f3160f4a)
Solutions
- Read the Stdout/Stderr embedded in the error — the installer's own failure message is there
- Install VirtualBox manually from the downloaded package or virtualbox.org
- Set `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned` and run vagrant from an elevated shell if UAC is the issue
- Reboot to clear pending-update states, ensure free disk space, then retry
Defensive patterns
Strategy: fallback
Try / catch
begin
provider_install.call
rescue Vagrant::Errors::ProviderInstallFailed => e
warn "installer failed:\n#{e.data[:stderr]}"
raise unless virtualbox_manually_installed? # fallback: manual install then retry vagrant
end Prevention
- Set ExecutionPolicy RemoteSigned and pre-elevate shells used for provider installs
- Clear pending reboots before installs
- Bake VirtualBox into images used by automation
When it happens
Trigger: `vagrant up` on Windows without VirtualBox; download and checksum succeed; install_virtualbox.ps1 exits non-zero — execution policy blocks it, elevation is denied, the MSU/EXE installer rejects the package, or a pending reboot blocks setup.
Common situations: ExecutionPolicy Restricted; UAC elevation declined; Windows version/patch level incompatible with the VirtualBox build (missing VC runtime, pending-reboot WU states); AV blocking the installer.
Related errors
- Installation of the provider '%{provider}' failed! The stdou
- The checksum of the downloaded provider '%{provider}' did no
- Failed to locate the powershell executable on the available
- The version of powershell currently installed on this host i
- A command must be provided when the --elevated flag is provi
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/b2b968785ce1013d.
Report an issue: GitHub.