there is a post-processor shell that you can use to run those commands. https://www.packer.io/docs/post-processors/shell-local.html
On Tue, Feb 13, 2018 at 8:01 PM, Steven Langlois <acadi...@gmail.com> wrote: > Thank Alvaro, that's what I have been doing but I wanted to use the method > on this webpage: > > http://work.haufegroup.io/automate-ami-with-packer/ > > to create an ami which requires formatting the VM as an ova file. That > means adding a post-processor as shown in the page above but the metadata > would need to be added before packer does the post-processing. > > Is there a way I can run a script that does what I need have then have > packer produce the ova from the result. > > Right now, in a script I do the following to insert the metadata into the > ovf file and then use ovftool to create the ova myself. > > # Insert the vAppSettings.txt file into the ovf file just created > sed -n -i -e '/ <\/VirtualSystem>/r /opt/IBM/cmdBuild/workspace/ > ranger/nightly_builds/vAppSettings.txt' -e 1x -e '2,${x;p}' -e '${x;p}' > $VMDIR/$VMDIR_ovf/$VMDIR/$VMDIR.ovf > > # Convert the ovf file just created to an ova file after adding in the > Product, Version, Vendor, etc. info > ovftool -tt=ova --skipManifestCheck $VMDIR/$VMDIR_ovf/$VMDIR/$VMDIR.ovf > $VMDIR/ > if [ $? -ne 0 ]; then > echo "VM build failed: Failed to convert the $VMDIR vmx to an ova > file" > success=FALSE > break > fi > > > I can figure out how to get the ova I am current building to AWS but I was > hoping to have packer do it. > > > On Tuesday, February 13, 2018 at 6:21:03 AM UTC-5, Alvaro Miranda Aguilera > wrote: >> >> Hello >> >> You can use ovftool from VMWare >> >> https://www.vmware.com/support/developer/ovf/ovf400/ovftool- >> 400-userguide.pdf >> >> Metadata inclusion. Additional metadata, such as an end-user license >> agreement, can be packaged with the OVF and displayed before installation >> >> >> -- > 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 packer-tool+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/packer-tool/1ff41059-3f64-4861-8a5d-c67f5a561088%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/1ff41059-3f64-4861-8a5d-c67f5a561088%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 packer-tool+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAHqq0ezHbt9TgBcKy71ns%3D%2BoN%3DwRrM0uR0DuRBneOrVE07XM-g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.