Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Is there a vSphere CLI command that lists all the snapshots on a given ESXi VM?

Posted on 2011-05-06
7
Medium Priority
?
1,410 Views
Last Modified: 2012-05-11
Using vmware-cmd.pl  -l     I list all the vm's on an ESXi server.

Is there a command to list all the snapshots (and hopefully all their notes) on each of the vm's?

Thanks.
0
Comment
Question by:gateguard
7 Comments
 
LVL 124

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 2000 total points
ID: 35709137
I would recommend using the following tools, 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/

It's also worth looking at The free VMware Guest Console

http://labs.vmware.com/flings/vgc

The free VMware Guest Console, an experimental application created by VMware Labs, is a great tool for managing vSphere VM processes and files. You can view, sort and kill processes across all VMs, and you can also run a script on all Windows or Linux VMs.
0
 
LVL 124
ID: 35709155
Availailble in the VMware Community Pack

 Snapshots in VMware Community Pack
0
 
LVL 40

Expert Comment

by:coolsport00
ID: 35709198
There is a PowerCLI script:
Get-VM | Get-Snapshot | Select VM, Name, Description, Created

Regards,
~coolsport00
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 28

Expert Comment

by:bgoering
ID: 35709480
Yes powercli is likely the best bet. For example:

[vSphere PowerCLI] C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI
> get-vm vshieldmgr | get-snapshot | fl *


Description       : two
Created           : 5/6/2011 8:22:40 PM
Quiesced          : False
PowerState        : PoweredOn
VM                : vShieldMgr
VMId              : VirtualMachine-vm-1643
Parent            :
ParentSnapshotId  :
Children          :
SizeMB            : 11269.11
IsCurrent         : True
IsReplaySupported : False
Id                : VirtualMachineSnapshot-snapshot-1808
Name              : one



[vSphere PowerCLI] C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI
>

0
 
LVL 28

Expert Comment

by:bgoering
ID: 35709488
otherwise you would have to use the vifl.pl from the last question and look for filenames that indicate it is a snapshot
0
 
LVL 124
ID: 35709524
or use the VMware Community Pack for everthing. (if you prefer GUIs)
0
 

Author Closing Comment

by:gateguard
ID: 35709774
Thanks.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
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 configure vSphere clusters to support the VMware FT feature Open vSphere Web Client: Verify vSphere HA is enabled: Verify netowrking for vMotion and FT Logging is in place or create it: Turn On FT for a virtual machine: Verify …
Teach the user how to use create log bundles for vCenter Server or ESXi hosts Open vSphere Web Client: Generate vCenter Server and ESXi host log bundle:  Open vCenter Server Appliance Web Management interface and generate log bundle: Open vCenter Se…
Suggested Courses

810 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