I don’t know of an option in Packer to do exactly that. If not, you could write up a script to call the API in your VM host to trigger the snapshot. Then that script could be one of the last builder scripts in the Packer JSON file.
On Saturday, June 12, 2021 at 9:37:21 AM UTC-5 [email protected] wrote: > Hi, > I need to create a snapshot of a virtual machine, configured through > packer virtualbox-vm, BEFORE the shutdown command. Is it possible? for now > I am doing it manually. > This is different to the "target_snapshot" option that runs at the end. I > need the snapshot with the machine "turned on". > Thanks in advance for any suggestion. > -- 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/hashicorp/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/9c0fb0ec-7e88-482f-968c-6b27e2f68259n%40googlegroups.com.
