• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 392
  • Last Modified:

VMWARE easy way to see what guests have snapshots on them ?

is there a easy way to tell what guests have snapshots , other than selecting each one and seeing if they exist in snapshot manager ?
0
NAMEWITHELD12
Asked:
NAMEWITHELD12
  • 2
4 Solutions
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Yes, I would use the following

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

VMware Community Pack

http://www.virtu-al.net/featured-scripts/vmware-powerpack/


 Snapshots-Query-shown-in-VMware-.jpg
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
You could also set an Alarm in vCenter.
0
 
Luciano PatrãoICT Senior Infraestructure Engineer Commented:
Hi

Using PowerShell you can list this, hanccocka inform above.

This is a small Script that I have created to list all snapshots for each VM.

I  use PowerGUI from Quest(VMware vSphere Management).

http://www.powergui.org/entry.jspa?externalID=1802

Hope this can help

Jail
###########################################################################################
# TScript: List All Snaphots for each VM												  #
# Created by: Luciano Patrão													       	  #
# Date: 01-12-2010   						 	     	                	       		  #
###########################################################################################

$server = "Enter vCenter IP or VMware host IP"
$user = "Enter user"
$pwd = "Enter password"

Connect-VIServer $server -User $user -Password $pwd

$AllVirtualMachines = Get-VM

foreach ($VirtualMachine in $AllVirtualMachines)
	{$AllSnapshots=Get-Snapshot -VM $VirtualMachine
		foreach ($Snapshot in $AllSnapshots)
	 		{If ($Snapshot.ID -like "VirtualMachineSnapshot-*")
  			{Write-Host "VM-> " $VirtualMachine.Name, 
				" - Snapshot Name-> " $Snapshot.Name, 
				" - Snapshot Description-> "$Snapshot.Description}}}

Open in new window

0
 
ADP indiaCommented:
here is the single powercli command for your requirement.

get-vm | Get-Snapshot -VM {$_.Name} | select name,vm

Of course, before using this command you should connect to Vcenter server by using below command  :)

Connect-VIServer -Server servername -User username -Password password  
0

Featured Post

What Security Threats Are We Predicting for 2018?

Cryptocurrency, IoT botnets, MFA, and more! Hackers are already planning their next big attacks for 2018. Learn what you might face, and how to defend against it with our 2018 security predictions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now