Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsync requirement on windows? #6696

Closed
daveneeley opened this issue Dec 21, 2015 · 12 comments
Closed

rsync requirement on windows? #6696

daveneeley opened this issue Dec 21, 2015 · 12 comments

Comments

@daveneeley
Copy link

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/ vagrant@127.0.0.1:/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.

@daveneeley
Copy link
Author

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"

@sysarcher
Copy link

@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?

@mwolff-unl
Copy link

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.

@mlushpenko
Copy link

@daveneeley thanks, helped me as well even though I am running Windows 7

@TylerNakamura
Copy link

TylerNakamura commented Aug 25, 2016

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.

Link to Vagrant 1.8.4 download

@krisjey
Copy link

krisjey commented Feb 6, 2017

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?

@inge4pres
Copy link

inge4pres commented May 14, 2017

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.

@diepnguyen1905
Copy link

thank @inge4pres

@seishun
Copy link

seishun commented Jun 17, 2017

This is still an issue, can this be re-opened?

@ghost
Copy link

ghost commented Aug 9, 2017

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.

@apolopena
Copy link

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?

@ghost
Copy link

ghost commented Mar 29, 2020

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.

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants