Does anyone have a script or know how to write one to automatically take a snapshot of a VM before launching it for use?

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

If your running windows placing this text into a .bat file should do the trick:

cd "C:\Program Files\Oracle\VirtualBox
VBoxManage snapshot "Virtual Name" take "Snapshot Name"
VBoxManage startvm "Virtual Name"

If your running a *NIX you will have to change this to something like

VBoxManage snapshot "Virtual Name" take "Snapshot Name"
VBoxManage startvm "Virtual Name"

As you wont need to change your directory to access the VBoxManage command and save it to a .sh file, change the attribute to executable and then invoke it to run it.

link|improve this answer
Thanks, I'm going to try this right now! – pthesis Jun 16 '11 at 1:32
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.