Is there a way to programmatically take snapshots of my VM from the Vagrantfile?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a way to programmatically take snapshots of my VM from the Vagrantfile?

Niko
Hello,

I am trying to take a snapshot of my VM automatically before and after provisioning my box. Is there a way to do this without using a top level script?

--Niko

--
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/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/5106810d-50e7-494a-8bd9-41494a2ddaca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to programmatically take snapshots of my VM from the Vagrantfile?

Alvaro Miranda Aguilera
Hello

Perhaps you can use vagrant triggers? it will allow you run commands on host before/after etc.


Have a look at the snapshot recipe here, it may need adjustment since snapshot is now an internal feature so commands can be different:


Alvaro

On Wed, Nov 8, 2017 at 9:23 PM, Niko <[hidden email]> wrote:
Hello,

I am trying to take a snapshot of my VM automatically before and after provisioning my box. Is there a way to do this without using a top level script?

--Niko

--
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/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/5106810d-50e7-494a-8bd9-41494a2ddaca%40googlegroups.com.
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/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ew5%3DdYbScrt6m5FpYVQc0AuhR3UOidO3qvT1FK1_F%3D46g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.