Using modified Vagrantfile from https://github.com/saltstack-formulas/salt-formula, with centos/7 base box, vagrant 1.7.4 and VirtualBox 5.0.10. (Works fine when the base box is ubuntu/trusty64)
Running from Windows 8, PowerShell prompt.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos/7"
config.vm.hostname = "salt"
config.vm.synced_folder ".", "/srv/salt", id: "vagrant-root"
end
vagrant up results in a log like this:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' is up to date...
==> default: Clearing any previously set forwarded ports...
"rsync" could not be found on your PATH. Make sure that rsync
is properly installed on your system and available on the PATH.
If you choose to install rsync for windows (ie, choco install rsync), then vagrant up returns:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' is up to date...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
...
==> default: Setting hostname...
==> default: Installing rsync to the VM...
==> default: Rsyncing folder: /d/repos/salt-formula/ => /home/vagrant/sync
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.
Host path: /d/repos/salt-formula/
Guest path: /home/vagrant/sync
Command: rsync --verbose --archive --delete -z --copy-links --chmod=ugo=rwX --no-perms --no-owner --no-group --rsync-path sudo rsync -e ssh -p 2222 -o StrictHostKeyChecking=no -o IdentitiesOnly=true -o UserKnownHostsFile=/dev/null -i 'D:/repos/salt-formula/.vagrant/machines/default/virtualbox/private_key' --exclude .vagrant/ /d/repos/salt-formula/ [email protected]:/home/vagrant/sync
Error: cygwin warning:
MS-DOS style path detected: D:/repos/salt-formula/.vagrant/machines/default/virtualbox/private_key
Preferred POSIX equivalent is: /cygdrive/d/repos/salt-formula/.vagrant/machines/default/virtualbox/private_key
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.
rsync: change_dir "/d/repos/salt-formula" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1165) [sender=3.1.1]
Why is rsync required on the host side?
When 'Installing rsync to the VM', what is the package source for that action?
Why does vagrant try to sync /home/vagrant/sync? That path isn't in the Vagrantfile.
Are there settings inside the box that are affecting this?
I've seen #6154 but it didn't answer my questions satisfactorily.
I found there is a Vagrantfile inside the box image where these settings were defined. In my case
C:\Users....vagrant.d\boxes\centos-VAGRANTSLASH-7\1509.01\virtualbox\Vagrantfile
Removing this line from that file makes the box happy.
config.vm.synced_folder ".", "/home/vagrant/sync", type: "rsync"
@daveneeley THANKS!! This fixed it for me. I spent several hours looking for a fix - wish I'd stumbled upon your suggestion earlier.
But, what is the core problem? can someone explain? Is it getting fixed in a new release?
For Centos and Windows 8.1 I also had to add
config.vm.synced_folder ".", "/home/vagrant/sync", disabled: true in order to past it trying to use rsync. (You could also make that type: "virtualbox" if you want the folder stil.
@daveneeley thanks, helped me as well even though I am running Windows 7
Found that this is a known issue for windows users.
It looks like downgrading Vagrant to 1.8.4 may solve the issue until 1.8.6 comes out.
This error re-raised on vagrant 1.9.1, windows 7.
And I changed 'Vagrantfile file' for avoiding this bug.
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
Currently, Above method is working fine for me.
Could you fix this error for next release?
Windows 10 with latest version
francesco.gualazzi@MW7GAISM0JDJNQ MINGW64 ~/Documents/Software/Vagrant/dev
$ vagrant version
Installed Version: 1.9.4
Latest Version: 1.9.4
You're running an up-to-date version of Vagrant!
francesco.gualazzi@MW7GAISM0JDJNQ MINGW64 ~/Documents/Software/Vagrant/dev
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' is up to date...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
"rsync" could not be found on your PATH. Make sure that rsync
is properly installed on your system and available on the PATH.
This after
vagrant init centos/7
EDIT
Works after adding
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
in Vagrantfile.
thank @inge4pres
This is still an issue, can this be re-opened?
i had this same issue, but it was due to my changing the box from ubuntu to centos
from
config.vm.box = "ubuntu/artful64"
to
config.vm.box = "centos/7"
wiping my old images, and starting fresh worked.
I found there is a Vagrantfile inside the box image where these settings were defined. In my case
C:\Users....vagrant.d\boxes\centos-VAGRANTSLASH-7\1509.01\virtualbox\Vagrantfile
Removing this line from that file makes the box happy.
config.vm.synced_folder ".", "/home/vagrant/sync", type: "rsync"
How did you do this?
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
I found there is a Vagrantfile inside the box image where these settings were defined. In my case
C:\Users....vagrant.d\boxes\centos-VAGRANTSLASH-7\1509.01\virtualbox\Vagrantfile
Removing this line from that file makes the box happy.
config.vm.synced_folder ".", "/home/vagrant/sync", type: "rsync"