hashicorp/vagrant · warning
Guest '%{machine}' using provider '%{provider_name}' has pro
Error message
Guest '%{machine}' using provider '%{provider_name}' has provider specific config options for a provider other than '%{provider_name}'. These provider config options will be ignored for this guest What it means
A disk's provider-specific options (collected via add_provider_config from `provider__option: value` keys or `{provider: {...}}` hashes) only apply to the provider actually in use. During disk config validation, if provider_config is non-empty but has no key matching machine.provider_name, those options cannot be used, so Vagrant warns they will be ignored; the disk itself still validates.
Source
Thrown at plugins/kernel_v2/config/disk.rb:202
end
if @type == :dvd && @primary
errors << I18n.t("vagrant.config.disk.dvd_type_primary", name: @name, machine: machine.name)
end
if @file
if !@file.is_a?(String)
errors << I18n.t("vagrant.config.disk.invalid_file_type", file: @file, machine: machine.name)
elsif !File.file?(@file)
errors << I18n.t("vagrant.config.disk.missing_file", file_path: @file,
name: @name, machine: machine.name)
end
end
if @provider_config
if !@provider_config.empty?
if !@provider_config.key?(machine.provider_name)
machine.env.ui.warn(I18n.t("vagrant.config.disk.missing_provider",
machine: machine.name,
provider_name: machine.provider_name))
end
end
end
if !@name
errors << I18n.t("vagrant.config.disk.no_name_set", machine: machine.name)
end
errors
end
# The String representation of this Disk.
#
# @return [String]
def to_s
"disk config"View on GitHub (pinned to 35f3160f4a)
Solutions
- Add options under the active provider's key so provider_config includes machine.provider_name (e.g. vmware_desktop__...)
- Keep provider-agnostic settings (size, name, type, file) at the top level so they apply under any provider
- Confirm the active provider with `vagrant status` or the --provider flag and align the option prefixes
- Check the spelling of the `provider__option` double-underscore prefix — unknown shapes are logged and dropped by add_provider_config
Example fix
# before config.vm.disk :disk, name: "data", size: "10GB", virtualbox__disk_type: "hdd" # (warns when machine runs under vmware_desktop) # after config.vm.disk :disk, name: "data", size: "10GB", vmware_desktop__disk_type: "hdd"
Defensive patterns
Strategy: type-guard
Validate before calling
# Tooling: assert disk provider options cover the provider about to run
missing = disks.select { |d| !d.provider_config.empty? && !d.provider_config.key?(provider_name) } Type guard
def disk_options_apply?(disk, provider_name) disk.provider_config.empty? || disk.provider_config.key?(provider_name) end
Prevention
- Use the exact provider symbol as the option prefix (vmware_desktop__..., virtualbox__...)
- Keep provider-agnostic disk settings at the top level
- Pin the provider explicitly with `vagrant up --provider=<name>` so the mapping is obvious
When it happens
Trigger: A Vagrantfile sets disk options like `virtualbox__disk_type: "hdd"` (double-underscore provider prefix) or provider_config = {virtualbox: {...}}, but the machine runs under a different provider (e.g. `vagrant up --provider=vmware_desktop` or hyperv).
Common situations: Vagrantfiles shared across hypervisors; switching the default provider; typos in the provider prefix of the option name.
Related errors
- There was an error loading a Vagrantfile. The file being loa
- Ignoring provider config for validation...
- This Vagrant environment has specified that it requires the
- A URL to a Vagrant Cloud server is not set, so boxes cannot
- The box '%{name}' could not be found or could not be accesse
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/96b6a0379cbfe2c2.
Report an issue: GitHub.