Hello

How are you adding the value to the VMX?

Are 2 parameters, one for the build and one before the export.

Be sure to add it to both and should do what you are after:


   -

   vmx_data <https://www.packer.io/docs/builders/vmware-iso.html#vmx_data>
(object
   of key/value strings) - Arbitrary key/values to enter into the virtual
   machine VMX file. This is for advanced users who want to set properties
   such as memory, CPU, etc.
   -

   vmx_data_post
   <https://www.packer.io/docs/builders/vmware-iso.html#vmx_data_post> (object
   of key/value strings) - Identical to vmx_data, except that it is run
   after the virtual machine is shutdown, and before the virtual machine is
   exported.



On Fri, Jun 2, 2017 at 10:52 PM, John C <[email protected]> wrote:

> I'm using Packer to build a Windows 21012 R2 server image for our VMware
> ESXi environment, with all of the code stored in a local GitHub
> repository.  During the Packer image build process, I get the short
> SHA associated with the GitHub commit and then add that to the VMX file as
> a custom attribute, so we can associate that image back to the GitHub
> commit later.  While the image is building, the custom attribute is
> definitely in the VMX file, but once it's fully built and OVFTOOL takes
> over to clone it to other ESXi locations, this custom attribute is not
> present in the cloned image.  Is there a way to persist this custom VMX
> data throughout the entire Packer image build process, start to finish?
> Thanks.
>
> --
> 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/d9aab02e-a616-4b8b-99b2-8a6eae18846c%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/d9aab02e-a616-4b8b-99b2-8a6eae18846c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Alvaro

-- 
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/CAHqq0ewvgiE0GfKysJLAPrA8Ekutb%2B_rmmPvARbK%2BXHN%3Df8amQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to