hashicorp/vagrant · error
vagrant.chef_cant_detect
Error message
vagrant.chef_cant_detect
What it means
Error "vagrant.chef_cant_detect" thrown in hashicorp/vagrant.
Source
Thrown at plugins/provisioners/chef/installer.rb:24
class Installer
def initialize(machine, options = {})
@machine = machine
@product = options.fetch(:product)
@channel = options.fetch(:channel)
@version = options.fetch(:version)
@force = options.fetch(:force)
@omnibus_url = options.fetch(:omnibus_url)
@options = options.dup
end
# This handles verifying the Chef installation, installing it if it was
# requested, and so on. This method will raise exceptions if things are
# wrong.
def ensure_installed
# If the guest cannot check if Chef is installed, just exit printing a
# warning...
if !@machine.guest.capability?(:chef_installed)
@machine.ui.warn(I18n.t("vagrant.chef_cant_detect"))
return
end
if !should_install_chef?
@machine.ui.info(I18n.t("vagrant.chef_already_installed",
version: @version.to_s))
return
end
@machine.ui.detail(I18n.t("vagrant.chef_installing",
version: @version.to_s))
@machine.guest.capability(:chef_install, @product, @version, @channel, @omnibus_url, @options)
if !@machine.guest.capability(:chef_installed, @product, @version)
raise Provisioner::Base::ChefError, :install_failed
end
end
View on GitHub (pinned to 35f3160f4a)
When it happens
Trigger: Thrown at plugins/provisioners/chef/installer.rb:24 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/bb966911043cc9d4.
Report an issue: GitHub.