Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 1 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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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