Solved

Restore snapshots on VM servers weekly

Posted on 2012-03-26
4
404 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 118
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 118
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 118

Accepted Solution

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…
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…

920 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

12 Experts available now in Live!

Get 1:1 Help Now