Solved

Automatic snapshot rollback with VMware ESXi 4?

Posted on 2010-08-20
6
1,951 Views
Last Modified: 2013-11-11
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?
0
Comment
Question by:NetworkConsultant01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 40

Expert Comment

by:coolsport00
ID: 33487411
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
0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 33487556
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 
0
 
LVL 28

Accepted Solution

by:
bgoering earned 500 total points
ID: 33487907
Yes, actually that is a doable thing. Set up the virtual machine as you would like it to be. Power down the VM. Edit the settings on the VM and for each hard disk drive check the box that says Independent, then select the non-persistent option. Save your configuration away.

Now when someone powers the VM on they can work along and do whatever they want. When the vm is powered off it will revert back to the state where you have configured it and start from there again next time you power it on.

With this method no (user managed) snapshots are utilized, the system creates a delta file (kind of like a snapshot) for the vm to log disk changes to while it is running, then reverts it back by deleting the delta file when the vm is powered off.

Good Luck
0
When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot has fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

 
LVL 6

Expert Comment

by:davismisbehavis
ID: 33491375
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.
0
 
LVL 28

Expert Comment

by:bgoering
ID: 33491382
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.
0
 
LVL 6

Expert Comment

by:davismisbehavis
ID: 33491407
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.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
Teach the user how to install log collectors and how to configure ESXi 5.5 for remote logging Open console session and mount vCenter Server installer: Install vSphere Core Dump Collector: Install vSphere Syslog Collector: Open vSphere Client: Config…
In this video tutorial I show you the main steps to install and configure  a VMware ESXi6.0 server. The video has my comments as text on the screen and you can pause anytime when needed. Hope this will be helpful. Verify that your hardware and BIO…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question