Solved

Restore snapshots on VM servers weekly

Posted on 2012-03-26
4
401 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
  • 3
4 Comments
 
LVL 117

Expert Comment

by:Andrew Hancock (VMware vExpert / EE MVE)
Comment Utility
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 117

Expert Comment

by:Andrew Hancock (VMware vExpert / EE MVE)
Comment Utility
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 117

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE) earned 500 total points
Comment Utility
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
Comment Utility
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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Will try to explain how to use the VMware feature TAGs in the VMs and create Veeam Backup Jobs using TAGs. Since this article is too long, I will create second article for the Veeam tasks.
This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
Teach the user how to delpoy the vCenter Server Appliance and how to configure its network settings Deploy OVF: Open VM console and configure networking:
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now