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

how to use this plugin in Windows with cwRsync #28

Open
zhoujiealex opened this issue Jan 20, 2016 · 1 comment
Open

how to use this plugin in Windows with cwRsync #28

zhoujiealex opened this issue Jan 20, 2016 · 1 comment

Comments

@zhoujiealex
Copy link

I try to play vagrant in windows 10 and I vagrant up a centos6.6

I saw the plugin said:
_## 0.9.0 (June 28, 2015)
This release adds two big features: Windows support and automatic sync on startup.
_

Short version:
But how to use this plugin in windows?

  1. is cwRsync supported by this plugin
  2. If yes, would you please enhance this plugin?
    • _transform windows path into valid cygwin format before calling rsync in windows_

sorry for a long story...

First I add a related path synced folder like this:

   config.vm.synced_folder '../tmcas/storedirect', '/opt/o365/storedirect', type: 'rsync'

I run "vagrant up", then it said could't find rsync command, of course there's no this command under windows.
So I install cwRsync (https://www.itefix.net/content/cwrsync-free-edition)

I run again, this time it complains path is wrong:

   Host path: /e/Study/vagrant/docker-test/tmcas/storedirect/

As you can see, cwRsync based cygwin, and the default windows path format e:\Study\xxx is invalid.
So change the format - a full cygwin path format:

   config.vm.synced_folder '/cygwin/e/Study/...../tmcas/storedirect', '/opt/o365/storedirect', type: 'rsync'

This time, it complains: "host share folder is missing", yes it's not a valid windows format path:

e:\Study\vagrant\docker-test>vagrant up
Bringing machine 'default' up with 'docker' provider...
==> default: Docker host is required. One will be created if necessary...
    default: Vagrant will now create or start a local VM to act as the Docker
    default: host. You'll see the output of the `vagrant up` for this VM below.
    default:
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The host path of the shared folder is missing: /cygdrive/e/Study/vagrant/docker-test/drupal/profiles/myprofile

Detailed error output:

Bringing machine 'default' up with 'docker' provider...
==> default: Docker host is required. One will be created if necessary...
    default: Vagrant will now create or start a local VM to act as the Docker
    default: host. You'll see the output of the `vagrant up` for this VM below.
    default:
    default: Clearing any previously set network interfaces...
    default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Forwarding ports...
    default: 80 (guest) => 4567 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
    default: Booting VM...
    default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Machine booted and ready!
GuestAdditions 5.0.12 running --- OK.
    default: Checking for guest additions in VM...
    default: Setting hostname...
    default: Installing rsync to the VM...
    default: Rsyncing folder: /e/Study/vagrant/docker-test/tmcas/storedirect/ => /opt/o365/storedirect
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.

Host path: /e/Study/vagrant/docker-test/tmcas/storedirect/
Guest path: /opt/o365/storedirect
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 ControlMaster=auto -o ControlPath=C:/Users/karlzhou/AppData/Local/Temp/ssh.116 -o ControlPersist=10m -o StrictHostKeyChecking=no -o IdentitiesOnly=true -o UserKnownHostsFile=/dev/null -i 'C:/Users/karlzhou/.vagrant.d/boxes/centos6.6-karl/0/virtualbox/vagrant_private_key' --exclude .vagrant/ /e/Study/vagrant/docker-test/tmcas/storedirect/ vagrant@127.0.0.1:/opt/o365/storedirect
Error: Warning: Permanently added '[127.0.0.1]:2222' (RSA) to the list of known hosts.
mm_receive_fd: no message header
process_mux_new_session: failed to receive fd 0 from slave
mux_client_request_session: read from master failed: Connection reset by peer
Failed to connect to new control master
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]
    default: The previous process exited with exit code 1.
@kasimi
Copy link

kasimi commented Feb 8, 2016

I'm not sure if this helps. I use Vagrant on Windows 7 with the default cmd, no cygwin environment. The PATH variable contains C:\cwRsync_5.5.0_x86_Free\bin. With the following changes applied it works for me. kasimi/vagrant@22495f5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants