Auto rollback to baseline snapshot on Vsphere 5

Posted on 2012-08-15
Medium Priority
Last Modified: 2012-09-05
Hello All,

We are currently running vsphere 5 in our SMB.   I am looking for a way to have a demo desktop hosted on one of our servers that our sales staff would use to demo our products.

Basically, I would like to take a snapshot/baseline of this hosted desktop and from there I'm wondering if there is a way to auto-revert from the current state to a specified snapshot either when the user logs of, or the RDP session is lost.

Any advice is appreciated.


Question by:TokyoRay
LVL 23

Expert Comment

ID: 38298898
This link will show you a video on how to do it, right from vmware:


Author Comment

ID: 38298934
Sorry Savone,

But I see  nothing there about scripting an auto rollback to a snapshot.  That is the basics about manually working with snapshots.

In my query I did say auto-rollback.    So to be more clear with my question.   I need a way to script an automatic rollback to a target snapshot automatically when a user logs of the virtual desktop.  

Anyone now if this is possible?


LVL 40

Accepted Solution

coolsport00 earned 750 total points
ID: 38298955
I have not seen this, but sure it's possible. But, I don't think you necessarily need snapshots and scripting. What you can do is create your VM and make it exactly like you want it. Then, in the VM's Edit Settings area, change the disk to Independent -> Non-persistent. Then, users can shut down the VM (a restart or logoff doesn't work), the VM will revert back to the state upon which you enabled the VMDK to be Non-persistent. So, it's kinda like 'reverting' to a 'baseline' snapshot. It's an option. If I can find a script for you, I'll post it...if that's what you want and more comfortable with using.

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.


Author Comment

ID: 38298964
Hi Thank you,

That is certainly an option.  My only issue is that it would appear the need to have the end users (sales staff remember :)  )  start up the vmware instance.   They will be RDP'ing into the virtual desktops from around the world.   I just thought a script would be the easiest way to keep it invisible to the end users.  

It seems it might be possible with PowerCLI, I just have to figure it out I suppose.  Just thought someone may of already been down this road.

Thanks again.
LVL 24

Expert Comment

by:Nagendra Pratap Singh
ID: 38299283
You can do all what coolsport told you and create a shortcut with the target

shutdown.exe /s /f

For icon, use C:\Windows\System32\shell32.dll, there is a good red shutdown icon in it. This will shut the machine.

Your sales staff can click on it to refresh the machine.

Author Comment

ID: 38318775

Putting an icon on the desktop to shutdown doesn't really solve the problem I am afraid.   How would I get the sales staff to startup the client when they need to demo again?  

They access the client via browser RDP.   Again, this needs to be automatic so I think the only way to accomplish is using the scripting I mentioned early.   Oh well, will have to go that route I suppose.

Thanks though.

Author Comment

ID: 38371028
Oh well, I guess I'm going to have to find someone familiar with the scripting for vsphere in order to get this working.   Thanks anyways guys.

Featured Post

Cyber Threats to Small Businesses (Part 2)

The evolving cybersecurity landscape presents SMBs with a host of new threats to their clients, their data, and their bottom line. In part 2 of this blog series, learn three quick processes Webroot’s CISO, Gary Hayslip, recommends to help small businesses beat modern threats.

Question has a verified solution.

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

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…
This article outlines why you need to choose a backup solution that protects your entire environment – including your VMware ESXi and Microsoft Hyper-V virtualization hosts – not just your virtual machines.
Teach the user how to edit .vmx files to add advanced configuration options Open vSphere Web Client: Edit Settings for a VM: Choose VM Options -> Advanced: Add Configuration Parameters:
This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…
Suggested Courses

829 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