Hi,
yours is a good idea. I added a provisioner to do that. I was not able to
pass the machine name, I put it explicitly, but is working
  "provisioners":
  [
    {
      "type": "shell-local",
      "environment_vars": ["VMNAME={{.Name}}"],
      "inline": ["/usr/local/bin/VBoxManage snapshot base_slack_machine
take 'After slackware package install'"]
    }
  ]
Thank you!

On Sat, Jun 12, 2021 at 3:22 PM Dan Linder <[email protected]> wrote:

> 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 a topic in the
> Google Groups "Packer" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/packer-tool/RMzia5rHEaA/unsubscribe.
> To unsubscribe from this group and all its topics, 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
> <https://groups.google.com/d/msgid/packer-tool/9c0fb0ec-7e88-482f-968c-6b27e2f68259n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 

Best regards / Cordialmente,

William-Fernando Oquendo
--------------------------
Este correo puede carecer de tildes o eñes debido al teclado.

-- 
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/CA%2B8Z1WgVPDdrNbqAHKC8dD6siS79nzauEiFiW55kgPueUGc1CQ%40mail.gmail.com.

Reply via email to