?
Solved

Restore snapshots on VM servers weekly

Posted on 2012-03-26
4
Medium Priority
?
419 Views
Last Modified: 2012-06-27
So far after looking around for a while I cannot seem to find what I'm looking for.

We have some testing environments that we rebuild every Sunday.  Right now these are scattered across different machines and that have some issues.  What want to do is every Sunday evening reapply a snapshot of the server to return it to a baseline.  

We will build the VM to our gold standard then take a snapshot.  Once that is done we will release the environment to the users and they do what they do best.  Then Sunday evening I want to apply the snapshot we created after creating the gold standard, thus returning the environment to it's clean state.  Anyone have any suggestions?  Did I miss something in the VMCenter?

Thanks.
0
Comment
Question by:mcioffi209
[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
  • 3
4 Comments
 
LVL 122
ID: 37768465
Revert to Snapshot every Sunday evening using a PowerCLI script.

vCenter can schedule some tasks for automation

e.g. Deploy, Migrate, Create, Create a snapshot but not Revert.

See this Link

http://ict.myjewe.nl/ict/?p=192
0
 
LVL 122
ID: 37768504
Basic Revert to Snapshot for Snapshot called Baseline

Get-VM | `
ForEach-Object {
  Set-VM -VM $_ -Snapshot  (Get-Snapshot -VM $_ -Name Baseline) -Confirm:$false
}

Open in new window

0
 
LVL 122

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 2000 total points
ID: 37768733
So install the following:-

PowerCLI and PowerGUI on a Workstation

I would recommend using the following, also VMware recommends the use of PowerCLI, which is PowerShell interface with vSphere-specific additions.

http://communities.vmware.com/community/vmtn/server/vsphere/automationtools/powercli

One of the simplest PowerCLI examples, and something which is actually extremely useful on its own, is the Get-VM cmdlet. Which lists VMs.

PowerCLI can be a bit overwhelming to use,  But it can be enhanced with a nice toolset and a library of preconfigured scripts to jump-start your mass changes, which is possible with PowerGUI

http://powergui.org/index.jspa

and run this script when you need to using Task Scheduler
$snapshot = Get-Snapshot –VM myVM –Name ”Target-Snapshot”
Set-VM –VM myVM –Snapshot $snapshot

Open in new window

0
 

Author Closing Comment

by:mcioffi209
ID: 37771636
Thanks, we will be digging into this over the next 5 days or so.  But that looks pretty much like what I need.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

Last article we focus in how to VMware: How to create and use VMs TAGs – Part 1 so before follow this article and perform the next tasks, you should read the first article how to create the TAG before using them in Veeam Backup Jobs.
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 use vSphere Update Manager to update the VMware Tools and virtual machine hardware version Open vSphere Client: Review manual processes for updating VMware Tools and virtual hardware versions: Create a new baseline group in vSp…
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.
Suggested Courses

771 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