Hello,
I'm using Packer to create a Linux (Ubuntu) VirtualBox VM, usable on
Windows ; one main feature is to have the C: shared with this VM.
It works like a charm when VM is packaged on Windows, but sharing the C
path on Linux during VM creation fails (ie: when VM builded from continuous
integration process - no Windows agents).
Technically, the builder config:
"vboxmanage[_post]": [
[
"sharedfolder", "add", "{{.Name}}", "--name", "c", "--hostpath",
"C:/", "--automount"
]
],
Provides this correct VirtualBox command, but does nothing (no error, ...):
vboxmanage sharedfolder add vm-name --name c --hostpath C:/ --automount
Executed manually, this command provides a (logic) "*Shared folder path
'C:' is not absolute*" error.
If "*/C:*" used it works on Linux packaging or command line, but produced
VM is not usable on Windows ("*/C:*" not valid on Windows). Using UNC path
if a fail too.
*Conclusion*: Hard to configure a shared folder on Linux, usable on Windows
without error.
A dirty workaround is to update *SharedFolder* parameter directly in the
*.vbox* file, before the export (when VM is stopped).
*=> Is there a way to add a custom script/command after the **"provisioners**"
and before the export, to realize this hack ?*
Many thanks in advance.
Best regards
Alix.
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/9603ca55-bda3-4e1e-8e4b-fdcc9e8ebb12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.