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 does not work in 2.2.6 vagrant windows10 #11268

Closed
aaband opened this issue Dec 19, 2019 · 5 comments
Closed

rsync does not work in 2.2.6 vagrant windows10 #11268

aaband opened this issue Dec 19, 2019 · 5 comments

Comments

@aaband
Copy link

aaband commented Dec 19, 2019

Please note that the Vagrant issue tracker is in priority reserved for bug reports and enhancements. For general usage questions, please use the Vagrant mailing list:
https://groups.google.com/forum/#!forum/vagrant-up. Thank you!

Tip: Before submitting your issue, don't hesitate to remove the above introductory text, possible empty sections (e.g. References), and this tip.

Vagrant version

Run vagrant -v to show the version. If you are not running the latest version
of Vagrant, please upgrade before submitting an issue.
Installed Version: 2.2.6

Host operating system

This is the operating system that you run locally.
Windows10

Guest operating system

This is the operating system you run in the virtual machine.
Centos7

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.synced_folder ".", "/vagrant"
	config.vm.define "master" do |master|
	master.vm.network "private_network", ip: "172.28.128.5"
		master.vm.provider "virtualbox" do |vb|
			vb.memory = "2048"
			vb.name="kube-master"
			vb.cpus = 2	
		end

Please note, if you are using Homestead or a different Vagrantfile format, we
may be unable to assist with your issue. Try to reproduce the issue using a
vanilla Vagrantfile first.

Debug output

Provide a link to a GitHub Gist containing the complete debug output:
https://www.vagrantup.com/docs/other/debugging.html. The debug output should
be very long. Do NOT paste the debug output in the issue, just paste the
link to the Gist.

Expected behavior

What should have happened?
In 2.2.1 version worked fine!
==> master: Rsyncing folder: /cygdrive/c/DATA/vagrant/kube_vagrant/ => /vagrant

Actual behavior

What actually happened?
rsync returns error

Steps to reproduce

  1. Get latest vagrant version 2.2.6
  2. Run vagrant file as above from windows10 cmd (no cygwin)
  3. Receive an error

References

Are there any other GitHub issues (open or closed) that should be linked here?
For example:

@jbonhag
Copy link
Contributor

jbonhag commented Dec 19, 2019

Hi there,

Thanks for opening an issue with Vagrant! To use the rsync synced folder type, the machine running Vagrant must have rsync (or rsync.exe) on the path. It may be that rsync is on the PATH inside Cygwin but not from the Windows command prompt.

You might also consider switching to a CentOS box that comes with the VirtualBox guest additions installed (such as bento/centos-7) -- this will allow you to use VirtualBox's shared folders functionality without needing to have rsync installed.

Cheers!

@jbonhag jbonhag closed this as completed Dec 19, 2019
@aaband
Copy link
Author

aaband commented Dec 19, 2019

Hello,
Thank you for your reply.
I do not have rsync but I am able to upload and sync files via rsync on version 2.2.1
Not able on the version 2.2.6. Same environment.
Never had to install vbox additions

2.2.1 output:
c:\DATA\vagrant>rsync
'rsync' is not recognized as an internal or external command,
operable program or batch file.

c:\DATA\vagrant>vagrant reload
==> master: Rsyncing folder: /cygdrive/c/DATA/vagrant/kube_vagrant/ => /vagrant
==> master: Machine already provisioned. Run vagrant provision or use the --provision

@jbonhag
Copy link
Contributor

jbonhag commented Dec 19, 2019

Hi there,

Interesting! Thanks for the additional information. It turns out that this should work even without rsync.exe on the PATH in Vagrant 2.2.6 because we embed rsync with the Windows installer. So with your Vagrantfile, I see rsync being called like this:

==> master: Rsyncing folder: /cygdrive/c/DATA/vagrant/kube_vagrant/ => /vagrant
...
 INFO subprocess: Starting process: ["C:\\HashiCorp\\Vagrant\\embedded\\usr\\bin/rsync.EXE", "--verbose", "--archive", "--delete", "-z", "--copy-links", "--chmod=ugo=rwX", "--no-perms", "--no-owner", "--no-group", "--rsync-path", "sudo rsync", "-e", "ssh -p 2222 -o LogLevel=FATAL    -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i 'C:/DATA/vagrant/kube_vagrant/.vagrant/machines/master/virtualbox/private_key'", "--exclude", ".vagrant/", "/cygdrive/c/DATA/vagrant/kube_vagrant/", "vagrant@127.0.0.1:/vagrant"]

Would you be willing to create a Gist with the output of vagrant reload --debug on Vagrant 2.2.6 so we can investigate this further?

Thanks!

@briancain
Copy link
Member

Hey there,

I am going to close this due to lack of response. If this is still occurring, please open a new issue and follow the provided issue template that appears when you click the "New Issue" button. This will help us in getting a reproduction and fix. Thanks!

@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.
Projects
None yet
Development

No branches or pull requests

3 participants