joefitzgerald/packer-windows — pull request #90 by StefanScherer (2014-08-03 20:28:44+00:00)
Title: Install rsync

The script `rsync.bat` downloads and installs the `rsync.exe` into the OpenSSH folder to be able to use the synced folder type rsync as described in the [Vagrant documentation](https://docs.vagrantup.com/v2/synced-folders/rsync.html).

The script also creates a symlink so that the folder `/vagrant` could be used in the Vagrantfile to sync files to `C:\vagrant`. So the example from the Vagrant documentation works without any changes.

All other directories should be configured with the `/cygdrive/c` prefix as described in #88. Otherwise they end up in the OpenSSH folder instead of top-level on the C: drive.

I have tested this with a Windows 2012 R2 box and the following Vagrantfile:

```ruby
# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "tst2012r2"

config.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: ".git/"

config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true

config.vm.provider "virtualbox" do |vb|
vb.gui = true
end
end
```

As you can see I must specify the port forwarding for the SSH port. So would it be a good idea to add this port forwarding in the `vagrantfile-windows_2012_r2.template` (and also for the other OS boxes)?

You mentioned to add a wiki page. How to send a PR for that? Or should I add a `README-rsync.md`?
We can discuss this here and I can improve the PR.