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.

I am setting up Ubuntu in Virtualbox to test tutorials that I'm making. Each time I boot Ubuntu I need a fresh image, without any saved changes that were previously made (Saved documents or installed programs should not persist).

How can I ensure that no changes persist?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Get the VM into the state you want it in, then create a snapshot. Restore to that snapshot just before each time you start the VM. You may be able to automate this with the vboxmanage snapshot ... command: https://www.virtualbox.org/manual/ch08.html. It appears to have a restore subcommand, so you may be able script the combined restore + start by also using the startvm subcommand.

share|improve this answer

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.