Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant with VirtualBox on Windows10: "Rsync" could not be found on your PATH

I've used Vagrant for a while on a windows 7 system. Now I've a new PC with windows 10. I installed Oracle Virtual Box and Vagrant and I try to start a machine with the command vagrant up. The Vagrantfile is the same file that I used on my windows 7 system. This is the content of the Vagrantfile:

Vagrant.configure(2) do |config| config.vm.box = "debian/jessie64"  config.vm.provider "virtualbox" do |v|     v.customize ["modifyvm", :id, "--memory", "768"] end config.vm.provision :shell, path: "bootstrap.sh"  config.vm.network :private_network, ip: "172.27.146.17" config.vm.hostname = "www.delevensstijl.hst1.nl" config.hostsupdater.aliases = ["www.thelifestylemethod.hst1.nl"]  end 

this is the error i get

The error I get: "rsync" could not be found on your PATH. Make sure that rsync is properly installed on your system and available on the PATH.

Why is Vagrant looking for rsync since I use Virtualbox? How can I workaround this error?

like image 849
Stefan H Avatar asked Dec 09 '15 10:12

Stefan H


2 Answers

I found in another forum that the local Vagrant directory is mounted as "/vagrant" via rsync. This is set in the box itself, you can check by opening

C:\Users\{your_username}\.vagrant.d\boxes\debian-VAGRANTSLASH-jessie64\8.2.2\virtualbox\Vagrantfile

and see the setting

  config.vm.synced_folder \     ".",     "/vagrant",     type: "rsync" 

to get around this I added the following line in my local Vagrantfile

  config.vm.synced_folder ".", "/vagrant", type: "virtualbox" 

and the error was resolved

like image 130
Mr Griever Avatar answered Oct 13 '22 06:10

Mr Griever


I have solved this issue as below when use cent/7 at Windows 7.

Check the box synced_folder at C:\Users[username]\.vagrant.d\boxes\centos-VAGRANTSLASH-7\1602.02\virtualbox\Vagrantfile

config.vm.synced_folder ".", "/home/vagrant/sync", type: "rsync"    

Override the defition at project Vagrantfile for directory mapping.

config.vm.synced_folder ".", "/home/vagrant/sync", type: "virtualbox"   

I imagine the box might be prepared at non Windows system, this case can be happened on many boxes, such as fedora/23-cloud-base.

like image 26
user6131640 Avatar answered Oct 13 '22 05:10

user6131640