hashicorp/vagrant · error · Vagrant::Errors::RSyncNotInstalledInGuest
"rsync" was not detected as installed in your guest machine.
Error message
"rsync" was not detected as installed in your guest machine. This is required for rsync synced folders to work. In addition to this, Vagrant doesn't know how to automatically install rsync for your machine, so you must do this manually.
What it means
On enable, the rsync synced folder checks the guest's rsync_installed capability. If rsync is absent and the guest also lacks an rsync_install capability (so Vagrant could auto-install it), it raises RSyncNotInstalledInGuest with %{bin} = "rsync". The guest must carry rsync itself.
Source
Thrown at plugins/synced_folders/rsync/synced_folder.rb:38
end
def usable?(machine, raise_error=false)
rsync_path = Which.which("rsync")
return true if rsync_path
return false if !raise_error
raise Vagrant::Errors::RSyncNotFound
end
def prepare(machine, folders, opts)
# Nothing is necessary to do before VM boot.
end
def enable(machine, folders, opts)
if machine.guest.capability?(:rsync_installed)
installed = machine.guest.capability(:rsync_installed)
if !installed
can_install = machine.guest.capability?(:rsync_install)
raise Vagrant::Errors::RSyncNotInstalledInGuest if !can_install
machine.ui.info I18n.t("vagrant.rsync_installing")
machine.guest.capability(:rsync_install)
end
end
ssh_info = machine.ssh_info
if ssh_info[:private_key_path].empty? && ssh_info[:password]
machine.ui.warn(I18n.t("vagrant.rsync_ssh_password"))
end
folders.each do |id, folder_opts|
RsyncHelper.rsync_single(machine, ssh_info, folder_opts)
end
end
# Enable rsync synced folders within WSL when in use
# on non-DrvFs file systemsView on GitHub (pinned to 35f3160f4a)
Solutions
- Pre-install rsync when building the box image (add to Packer provisioners)
- Switch the synced folder to a type the guest supports (virtualbox, nfs)
- Boot once, install rsync in the guest manually, then run vagrant rsync / vagrant reload
- For distro plugin authors: implement the rsync_install capability so Vagrant can auto-install
Example fix
# before config.vm.synced_folder ".", "/vagrant", type: "rsync" # guest has no rsync, no auto-install # after config.vm.synced_folder ".", "/vagrant", type: "virtualbox" # or bake rsync into the box
Defensive patterns
Strategy: validation
Validate before calling
# before switching a folder to rsync, probe the guest
machine.communicate.test("command -v rsync >/dev/null") or ui.warn("guest lacks rsync - bake it into the box") Type guard
def guest_rsync_available?(machine) machine.guest.capability?(:rsync_installed) && machine.guest.capability(:rsync_installed) end
Try / catch
begin env.cli(%w(up)) rescue Vagrant::Errors::RSyncNotInstalledInGuest abort "Install rsync in the guest, then `vagrant rsync` / reload" end
Prevention
- Add rsync to Packer provisioners when building boxes that will use rsync folders
- Match folder type to what the guest image supports
- After a one-off manual install, `vagrant rsync` re-syncs without a full rebuild
When it happens
Trigger: A type: "rsync" synced folder enabled on a guest whose capability set implements rsync_installed but not rsync_install, with rsync not preinstalled — minimal Alpine-style boxes, stripped custom images, distros Vagrant can't auto-provision.
Common situations: Minimal cloud-init/container-ish guests; boxes built with packages stripped; switching a guest that always used vboxsf to rsync folders.
Related errors
- No NFS client was detected as installed in your guest machin
- There was an error while attempting to run the post rsync co
- The box you're attempting to add doesn't support the provide
- The box you're attempting to add doesn't support the request
- 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/daed529c86a0b948.
Report an issue: GitHub.