Packer file provisioner failing with windows virtual machines

1,150 views
Skip to first unread message

Harsh Desai

unread,
Sep 13, 2013, 8:42:25 PM9/13/13
to packe...@googlegroups.com
Hi 

It tried using the packer file provisioner to copy a directory (containing a single file init.pp) to a windows machine. However, it fails to do so (however the packer build still suceeds).

2013/09/13 17:32:38 ui: ==> vmware: Uploading /mnt/netstore/users/hdesai/automation/puppet/windev/manifests/ => C:\
2013/09/13 17:32:38 /home/devp/packer/packer-builder-vmware: 2013/09/13 17:32:38 Upload dir '/mnt/netstore/users/hdesai/automation/puppet/windev/manifests/' to 'C:\'
2013/09/13 17:32:38 /home/devp/packer/packer-builder-vmware: 2013/09/13 17:32:38 opening new ssh session
2013/09/13 17:32:38 /home/devp/packer/packer-builder-vmware: 2013/09/13 17:32:38 Starting remote scp process:  scp -rvt C:\
2013/09/13 17:32:38 /home/devp/packer/packer-builder-vmware: 2013/09/13 17:32:38 Started SCP session, beginning transfers...
2013/09/13 17:32:38 /home/devp/packer/packer-builder-vmware: 2013/09/13 17:32:38 Copying input data into in-memory buffer so we can get the length
2013/09/13 17:32:39 /home/devp/packer/packer-builder-vmware: 2013/09/13 17:32:39 Beginning file upload...
2013/09/13 17:32:39 /home/devp/packer/packer-builder-vmware: 2013/09/13 17:32:39 SCP session complete, closing stdin pipe.
2013/09/13 17:32:39 /home/devp/packer/packer-builder-vmware: 2013/09/13 17:32:39 Waiting for SSH session to complete.
2013/09/13 17:32:39 /home/devp/packer/packer-builder-vmware: 2013/09/13 17:32:39 scp stderr (length 24): Sink: C0644 713 init.pp


My file provisioner in the template looks like:

{
      "destination": "C:\\", 
      "source": "/mnt/netstore/users/hdesai/automation/puppet/windev/manifests/", 
      "type": "file"
}


Has anybody else tried using the file provisioner with windows?

Thanks
Harsh

ja...@geteventstore.com

unread,
Apr 22, 2014, 11:48:18 AM4/22/14
to packe...@googlegroups.com
Hi,

I'm seeing the same behaviour trying to copy in files to a Windows guest as well. Did you find a solution for this?


James

ja...@geteventstore.com

unread,
Apr 23, 2014, 6:07:31 AM4/23/14
to packe...@googlegroups.com
Hi

Actually I found a solution to this. Specifying a destination path doesn't appear to work. If you just specify the filename your file will end up in C:\Users\vagrant\filename, and you can then use a shell provisioner to copy it to where you need.

Cheers,


James

Tim Cleary

unread,
Jun 15, 2014, 11:29:38 PM6/15/14
to packe...@googlegroups.com
Mine wouldn't even upload to C:\Users\vagrant.
My workaround: stick the files in packer/scripts, mount them in "floppy_files" in the template json file instead.
Reply all
Reply to author
Forward
0 new messages