Link to home
Start Free TrialLog in
Avatar of NetworkConsultant01
NetworkConsultant01

asked on

Automatic snapshot rollback with VMware ESXi 4?

We have a ESXi host with a bunch of VMs, some are used for development. The developer would like for the guests to revert back to a fresh state after use. I have snapshots created of a "clean" state. Is there a way to automate this without some 3rd party software?
Avatar of coolsport00
coolsport00
Flag of United States of America image

There is no way that I'm aware of to automate reverting a VM (committing snapshots). You may be able to do so via scripting method, but I haven't seen anything on here like that. I know there is no GUI-based solution.

~coolsport00
No automated way I know of but heres some good info on cmdline reverts. You might be able to script something that monitors the VM, see's it shut down and so reverts to prior state.
http://communities.vmware.com/message/1358418 
ASKER CERTIFIED SOLUTION
Avatar of bgoering
bgoering
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
bgoering's solution will definitely work, just be sure the machines are actually getting switched off.  I have seen VM's in this mode being left on for ages, developers doing lots of work on them (SQL servers) and VMFS datastore space being chewed up real quick by the delta files.  You don't want to find yourself in a situation where there is no space left at all and you cannot manually commit the snapshots, it's just a pain to recover from.

What I would do in addition to bgoering's solution is create scheduled restarts of the machine to ensure wiping takes place and storage space does not become a concern.
Actually the snapshots never get committed in this mode. They get deleted without committing when the VM is powered off. davismisbehavis is correct though - the snapshots can grow a quite a bit over time.
Sorry,  totally correct this is a discard not a commit scenario.  I'm thinking of the various times when I have discovered snapshots I actually do need to commit and have no space.