hashicorp/vagrant · warning
Vagrant has noticed that the synced folder definitions have
Error message
Vagrant has noticed that the synced folder definitions have changed. With Docker, these synced folder changes won't take effect until you destroy the container and recreate it.
What it means
The Docker provider cannot live-update a running container's synced-folder mounts. The compare_synced_folders action diffs each configured folder (expanded guestpath to hostpath) against what the container recorded; if any entry is new or changed, or existing entries were removed, it warns that the changes only take effect after destroying and recreating the container.
Source
Thrown at plugins/providers/docker/action/compare_synced_folders.rb:57
invalid = true
else
old = File.expand_path(old)
end
if !invalid && old
invalid = true if old != File.expand_path(data[:hostpath])
end
if invalid
invalids[File.expand_path(data[:guestpath])] = File.expand_path(data[:hostpath])
end
end
end
# If we have invalid entries, these are changed or new entries.
# If we have existing entries, then we removed some entries.
if !invalids.empty? || !existing.empty?
machine.ui.warn(I18n.t("docker_provider.synced_folders_changed"))
end
@app.call(env)
end
end
end
end
end
View on GitHub (pinned to 35f3160f4a)
Solutions
- Recreate the container: `vagrant destroy -f && vagrant up`
- Use rsync-type synced folders and `vagrant rsync` / `vagrant rsync-auto` to push changes without recreation
- Revert the Vagrantfile edit if the change was unintended and the old mounts are fine
Example fix
# before vagrant reload # warns: new mounts won't apply # after vagrant destroy -f && vagrant up # container rebuilt with new mounts
Defensive patterns
Strategy: validation
Validate before calling
# Preflight: see what the container currently mounts before editing config vagrant ssh -c "mount | grep -v proc" || true
Prevention
- Batch synced-folder edits and recreate the container once, not per edit
- Use rsync-type folders for content that changes often
- Read this warning as a reminder to run destroy + up, not reload
When it happens
Trigger: Editing config.vm.synced_folder entries (new folder, changed host/guest path, removal) in a Vagrantfile for a docker-provider machine, then running `vagrant up` or `vagrant reload` against the existing container.
Common situations: Iterating on mount lists during development; adding a folder to a long-running container; switching a host path after moving the project.
Related errors
- NFS requires a host-only network to be created. Please add a
- The "docker" synced folder type can't be used because the p
- Multiple URLs for a box can't be specified when adding versi
- The box you're attempting to add doesn't support the provide
- The box you're attempting to add doesn't support the request
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/716b102bcb1a779d.
Report an issue: GitHub.