?
Solved

ESXi Rever to snapshot upon power off

Posted on 2011-05-05
12
Medium Priority
?
971 Views
Last Modified: 2012-05-11
Is there a way to have an ESXi guest revert to snapshot upon power off like in VMware Workstation?

I would like to have the guest revert to snapshot upon log off as well, is there a way this could be scripted?
0
Comment
Question by:bV_
  • 4
  • 4
  • 2
  • +1
12 Comments
 

Author Comment

by:bV_
ID: 35701716
I'm using a vCenter server as well, if that helps. guest OS is Windows 7
0
 
LVL 124
ID: 35701739
0
 
LVL 28

Expert Comment

by:bgoering
ID: 35701769
Yes, just configure the hard drive to be independent and non-persistant. Then it will revert to its base state each time you power off the vm.

Good Luck
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 28

Expert Comment

by:bgoering
ID: 35701786
I doubt you would have much luck with doing the revert on log off as the disk is "live" until such time as the vm is powered off.
0
 
LVL 124

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 2000 total points
ID: 35701807
you could also use

The free VMware Guest Console

http://labs.vmware.com/flings/vgc

PowerGUI

http://powergui.org/index.jspa

VMware Community PowerPack.

http://www.virtu-al.net/featured-scripts/vmware-powerpack/
0
 
LVL 124
ID: 35701848
0
 
LVL 28

Expert Comment

by:bgoering
ID: 35701857
After reflection you may be able to script something to use vmware-cmd or powercli to revert to a snapshot at logoff, so long as the snapshot includes memory state.

Look at http://www.eggheadcafe.com/software/aspnet/30020406/trouble-getting-logoff-script-to-run.aspx for how to set the registry to execute your script at logoff.
0
 
LVL 10

Expert Comment

by:simonlimon
ID: 35705437
How about using a nonpersistent disk?

But be aware that you cannot revert machines if they are AD machines, because they will not be synced.

http://www.virtuesofvirtualization.com/2006/10/magic-of-nonpersistent-drives-in-vmware.html
0
 
LVL 124
ID: 35705446
@simonlimon: link already submitted.
0
 
LVL 10

Expert Comment

by:simonlimon
ID: 35705492
OOps, sorry.
0
 
LVL 28

Expert Comment

by:bgoering
ID: 35705941
LOL - as was the non-persistent idea :)
0
 

Author Closing Comment

by:bV_
ID: 36007409
I was able to eventually hack something together using the scripting provided.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

If we need to check who deleted a Virtual Machine from our vCenter. Looking this task in logs can be painful and spend lot of time, so the best way to check this is in the vCenter DB. Just connect to vCenter DB(default DB should be VCDB and using…
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Teach the user how to configure vSphere Replication and how to protect and recover VMs Open vSphere Web Client: Verify vsphere Replication is enabled: Enable vSphere Replication for a virtual machine: Verify replicated VM is created: Recover replica…
Teach the user how to use create log bundles for vCenter Server or ESXi hosts Open vSphere Web Client: Generate vCenter Server and ESXi host log bundle:  Open vCenter Server Appliance Web Management interface and generate log bundle: Open vCenter Se…
Suggested Courses

864 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