{"record":{"id":"716b102bcb1a779d","repo":"hashicorp/vagrant","slug":"vagrant-has-noticed-that-the-synced-folder-definit","errorCode":null,"errorMessage":"Vagrant has noticed that the synced folder definitions have changed.\nWith Docker, these synced folder changes won't take effect until you\ndestroy the container and recreate it.","messagePattern":"Vagrant has noticed that the synced folder definitions have changed\\.\nWith Docker, these synced folder changes won't take effect until you\ndestroy the container and recreate it\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"plugins/providers/docker/action/compare_synced_folders.rb","lineNumber":57,"sourceCode":"                invalid = true\n              else\n                old = File.expand_path(old)\n              end\n\n              if !invalid && old\n                invalid = true if old != File.expand_path(data[:hostpath])\n              end\n\n              if invalid\n                invalids[File.expand_path(data[:guestpath])] = File.expand_path(data[:hostpath])\n              end\n            end\n          end\n\n          # If we have invalid entries, these are changed or new entries.\n          # If we have existing entries, then we removed some entries.\n          if !invalids.empty? || !existing.empty?\n            machine.ui.warn(I18n.t(\"docker_provider.synced_folders_changed\"))\n          end\n\n          @app.call(env)\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":39,"sourceCodeEnd":66,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/providers/docker/action/compare_synced_folders.rb#L39-L66","documentation":"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.","triggerScenarios":"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.","commonSituations":"Iterating on mount lists during development; adding a folder to a long-running container; switching a host path after moving the project.","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"],"exampleFix":"# before\nvagrant reload    # warns: new mounts won't apply\n# after\nvagrant destroy -f && vagrant up   # container rebuilt with new mounts","handlingStrategy":"validation","validationCode":"# Preflight: see what the container currently mounts before editing config\nvagrant ssh -c \"mount | grep -v proc\" || true","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["vagrant","docker","synced-folders","container-recreate"],"backgroundTag":"config-change-requires-recreate","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}