Open hc-github-team-packer opened 2 years ago
With the archival of this repository all open issues will be marked as read-only. If you wish to further discuss this plugin or any of its open issues we invite you to open a discussion on the Packer community forum.
More details on the plugin archiving process for this provisioner can be found on the Plans to Archive Unmaintained Packer Provisioner Plugins blog post.
This issue was originally opened by @RiccardoBoettcher in https://github.com/hashicorp/packer/issues/4585 and has been migrated to this repository. The original issue description is below.
When using the salt-masterless provisioner for a Windows target VM (on a linux host), the paths generated by the provisioner are not platform specific (for example mkdir command recevices
/srv/salt/states
, but should be\srv\salt\states
.Additionally the *unix specific commands for directory and file creation/management are used on Windows. This is another source of trouble.
version: packer v0.12.2
Host platform: Linux / Fedora 25
guest: Windows 8.1
communicator: winrm
builder virtualbox iso
provisioner: salt-masterless
Debug log output: https://gist.github.com/RiccardoBoettcher/ed21d6f8b0fae658f04ec025be82eeb7
template: see gist Difficult to provide as providing a packer based setup of Windows VM (using virtual box) requires a lot of setup effort. But this issues should be easy fixable by verifying the full-qualified path / files names being created a correct for all supported platforms. It should be possible to ensure this with tests.
Solution proposal: The problem might by the use of
filepath.ToSlash()
instead offilepath.FromSlash()
. The later will inject the OS specific path separator character.