Search code examples
vagrantvagrantfilevagrant-windowsvagrant-provision

Vagrant is searching form rsync on windows


This is the Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    config.vm.define :sylius do |sylius_config|
        sylius_config.vm.box = "debian/jessie64"

        sylius_config.vm.provider "virtualbox" do |v|
            v.gui = false
            v.memory = 1024
            v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
        end

        sylius_config.vm.synced_folder "sites/", "/var/www/sites", type: "smb" ,mount_options: ['rw', 'vers=3', 'tcp', 'fsc', 'nolock', 'actimeo=2']
        sylius_config.vm.network "private_network", ip: "10.0.0.200"

        # Shell provisioning
        sylius_config.vm.provision :shell, :path => "shell_provisioner/run.sh"
        sylius_config.vm.provision :shell, privileged: false, path: "shell_provisioner/module/sylius.sh"
    end
end

when I type vagrant up I get this:

==> sylius: Checking if box 'debian/jessie64' is up to date...
"rsync" could not be found on your PATH. Make sure that rsync
is properly installed on your system and available on the PATH

The share type is "smb", and I can see any reason why vagrant is searching for rsync. Any ideas? I'm using virtualbox as provider if that matters. I tried removing the type argument, but it didn't work. When I copied the Vagrantfile, the share type was "nsf", which requires rsync.


Solution

  • This box has a default synced folder with rsync type.

    If you look for the box's Vagrantfile (on mac its under ~/.vagrant.d/boxes/debian-VAGRANTSLASH-jessie64//virtualbox/Vagrantfile)

    Vagrant.configure("2") do |config|
      config.vm.base_mac = "0800278dc04d"
      config.vm.synced_folder ".", "/vagrant", type: "rsync"
      config.vm.post_up_message = "Vanilla Debian box. See https://atlas.hashicorp.com/debian/ for help and bug reports"
       #TODO check if this is still needed now that we use import2vox
      config.vm.provider "virtualbox" do |v|
          v.customize ["modifyvm", :id, "--cableconnected1", "on"]
      end
    
    end
    

    You need to either edit this file and change this, or within your current Vagrantfile, override the type for default or smb type.