{"record":{"id":"4fb33ec47d62b62b","repo":"hashicorp/vagrant","slug":"the-explicit-capability-host-specified-of-value","errorCode":null,"errorMessage":"The explicit capability host specified of '%{value}' could not be found.\n\nThis is an internal error that users should never see. Please report a bug.","messagePattern":"The explicit capability host specified of '%(.+?)' could not be found\\.\n\nThis is an internal error that users should never see\\. Please report a bug\\.","errorType":"exception","errorClass":"Vagrant::Errors::CapabilityHostExplicitNotDetected","httpStatus":null,"severity":"error","filePath":"lib/vagrant/capability_host.rb","lineNumber":35,"sourceCode":"  module CapabilityHost\n    # Initializes the capability system by detecting the proper capability\n    # host to execute on and building the chain of capabilities to execute.\n    #\n    # @param [Symbol] host The host to use for the capabilities, or nil if\n    #   we should auto-detect it.\n    # @param [Hash<Symbol, Array<Class, Symbol>>] hosts Potential capability\n    #   hosts. The key is the name of the host, value[0] is a class that\n    #   implements `#detect?` and value[1] is a parent host (if any).\n    # @param [Hash<Symbol, Hash<Symbol, Class>>] capabilities The capabilities\n    #   that are supported. The key is the host of the capability. Within that\n    #   is a hash where the key is the name of the capability and the value\n    #   is the class/module implementing it.\n    def initialize_capabilities!(host, hosts, capabilities, *args)\n      @cap_logger = Log4r::Logger.new(\n        \"vagrant::capability_host::#{self.class.to_s.downcase}\")\n\n      if host && !hosts[host]\n        raise Errors::CapabilityHostExplicitNotDetected, value: host.to_s\n      end\n\n      if !host\n        host = autodetect_capability_host(hosts, *args) if !host\n        raise Errors::CapabilityHostNotDetected if !host\n      end\n\n      if !hosts[host]\n        # This should never happen because the autodetect above uses the\n        # hosts hash to look up hosts. And if an explicit host is specified,\n        # we do another check higher up.\n        raise \"Internal error. Host not found: #{host}\"\n      end\n\n      name      = host\n      host_info = hosts[name]\n      host      = host_info[0].new\n      chain     = []","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/capability_host.rb#L17-L53","documentation":"CapabilityHostExplicitNotDetected is raised in initialize_capabilities! (lib/vagrant/capability_host.rb:35) when an explicitly requested capability host symbol is not a key in the hosts registry hash. The framework (guests, hosts, providers all use CapabilityHost) was told 'use host X' but X is unknown, which for end users usually means a bad guest/host symbol in configuration.","triggerScenarios":"initialize_capabilities!(host, hosts, capabilities, *args) is called with host non-nil and hosts[host] nil — e.g. Vagrantfile 'config.vm.guest = :windos' when Guest#new builds its capability host chain, or a plugin explicitly requesting an unregistered host class.","commonSituations":"Typos in config.vm.guest (e.g. :window instead of :windows); guest names removed/renamed across Vagrant versions (old :linux guest was removed); copy-pasted Vagrantfiles referencing plugin-provided guests whose plugin is not installed.","solutions":["Correct the symbol: use supported guests like :windows or :linux, or remove config.vm.guest entirely to let Vagrant autodetect","If the guest comes from a plugin, install/update that plugin so the host gets registered ('vagrant plugin install <plugin>')","Check the exact supported names for your Vagrant version in the docs/changelog before pinning"],"exampleFix":"# before (Vagrantfile)\nconfig.vm.guest = :windos\n\n# after\nconfig.vm.guest = :windows","handlingStrategy":"validation","validationCode":"supported = %i[linux windows] # check docs for version-specific list\nraise \"unsupported guest #{guest_sym}\" unless supported.include?(guest_sym)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Omit config.vm.guest unless detection genuinely fails; autodetect covers standard boxes","Re-verify guest symbols after Vagrant upgrades (names change across major versions)"],"tags":["vagrant","capability-host","guest","configuration","unknown-symbol"],"backgroundTag":"unknown-platform-identifier","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}