Synced folder in vagrant is not syncing in realtime

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 means rsync-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.

Leave a Comment

tech