I am setting up a synced folder in a vagrant machine like shown in cmd dump below and expect that whenever I update the files in this folder on the host machine the updates will
In your Vagrantfile
the synced folder type is default vboxsf
, however, in the vagrant up stdout, it is showing rsync type, I think you need to fix it in the config file.
Assume that you are using rsync type, you should have the following in your Vagrantfile
Vagrant.configure("2") do |config|
config.vm.synced_folder ".", "/vagrant", type: "rsync",
rsync__exclude: ".git/"
end
NOTE: By default,
rsync__auto
is set to true, which meansrsync-auto
will watch and automatically sync this folder.
Run vagrant rsync-auto
and the directory should be in sync between host and guest.
Refer to vagrant docs for more information.