I've just added the rsync.bat to the provisioners list on the windows2012r2.json and it seems that after creating the box successfully rsync seems to not work.
==> rbs1: Attempting graceful shutdown of VM...
==> rbs1: Clearing any previously set forwarded ports...
==> rbs1: Clearing any previously set network interfaces...
==> rbs1: Preparing network interfaces based on configuration...
rbs1: Adapter 1: nat
rbs1: Adapter 2: hostonly
==> rbs1: Forwarding ports...
rbs1: 5985 => 5985 (adapter 1)
==> rbs1: Running 'pre-boot' VM customizations...
==> rbs1: Booting VM...
==> rbs1: Waiting for machine to boot. This may take a few minutes...
rbs1: WinRM address: 127.0.0.1:5985
rbs1: WinRM username: _puppet
rbs1: WinRM transport: plaintext
==> rbs1: Machine booted and ready!
==> rbs1: Checking for guest additions in VM...
==> rbs1: Setting hostname...
==> rbs1: Configuring and enabling network interfaces...
==> rbs1: Rsyncing folder: /Users/lmo0/git/rabbitmq/ => /vagrant
==> rbs1: - Exclude: [".vagrant/", ".git/"]
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.
Host path: /Users/lmo0/git/rabbitmq/
Guest path: /vagrant
Command: rsync --verbose --archive --delete -z --copy-links --no-owner --no-group -e ssh -p 22 -o StrictHostKeyChecking=no -o IdentitiesOnly=true -o UserKnownHostsFile=/dev/null -i '/Users/lmo0/.vagrant.d/insecure_private_key' --exclude .vagrant/ --exclude .git/ /Users/lmo0/git/rabbitmq/ _puppet@127.0.0.1:/vagrant
Error: Warning: Permanently added '127.0.0.1' (RSA) to the list of known hosts.
Permission denied (publickey).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-45/rsync/io.c(453) [sender=2.6.9]
I know this is not a Packer Windows issue but looking for some clues. Since my default username is NOT vagrant I had to add certain parameters to make it work. Seems like rsync is failing when using the vagrant private key...
I've just added the rsync.bat to the provisioners list on the windows2012r2.json and it seems that after creating the box successfully rsync seems to not work.
Vagrantfile
I know this is not a Packer Windows issue but looking for some clues. Since my default username is NOT vagrant I had to add certain parameters to make it work. Seems like rsync is failing when using the vagrant private key...