VM Snapshots view provides a user with information about VM snapshotting activities across his environment.

The view provides with useful information like number of snapshots per VM, space used by the snapshots and other interesting details about the individual snapshot files like creation dates, sizes etc.

This view is very useful in tracking the usage of resources that snapshots consume and act on it by consolidating, migrating or deleting them.

Additional information about fields

Snapshot Space- This field shows space used by vmsn files. A vmsn file is used to store the exact state of the virtual machine when the snapshot was taken.

Total Space- In addition to the vmsn files a snapshot may contain other files like vmsd(stores the metadata or structure of the snapshot tree), vmdk(descriptor files) and -delta.vmdk(file that contains the changes done on this snapshot in relation with its parents). Total Space gives the space used by vmsn files along with these other files.

Snapshots present on VM name vc | inputlookup Entity | search type=RootFolder | table name | sort name | rename name AS vc true -4h now

Click on a datastore to see snapshot details on it

|`tstats` values(Inventory.filename) values(Inventory.fileattributes) values(Inventory.Snapshots) values(Inventory.type) from datamodel=VMwareInventory where host="$vc$" groupby _time host, Inventory.moid, Inventory.filename Inventory.filetype |`process_inventory` | stats first(filesize) AS Filesize, first(filedatastore) AS Datastore by host, moid, filename, filetype | stats sum(Filesize) AS totalSpace by host, moid, Datastore, filetype, filename | eval vmsnspace = if (lower(filetype)=="snapshotdata", totalSpace, 0 ) | stats list(filename) AS "SnapshotFiles", sum(totalSpace) AS TotalSnapSpace, sum(vmsnspace) AS VmsnSpace, count by host, moid, Datastore | search VmsnSpace > 0 | eval TotalSpace=`format_bytes(TotalSnapSpace)` | eval SnapshotSpace= `format_bytes(VmsnSpace)` | fields - totalSpace vmsnspace | lookup Entity moid AS moid, host AS host OUTPUT name AS name | lookup Entity lowername AS Datastore, host AS host OUTPUT moid AS HIDE-Datastore-moid | rename count AS "TotalFiles", host AS VirtualCenter, moid AS HIDE-VirtualMachine-moid, name AS VirtualMachine | table VirtualCenter VirtualMachine Datastore SnapshotFiles TotalFiles SnapshotSpace TotalSpace $timerange1.earliest$ $timerange1.latest$ True $row.Datastore$
Snapshot details for $datastore_for$ |`tstats` values(Inventory.filename) values(Inventory.fileattributes) values(Inventory.Snapshots) values(Inventory.type) from datamodel=VMwareInventory where host="$vc$" groupby _time,host, Inventory.moid, Inventory.filename |`process_inventory` | where filedatastore="$datastore_for$" AND lower(filetype)="snapshotdata" | stats first(snapshotName) AS SnapshotName, first(snapshotState) AS State, first(snapshotTime) AS CreateTime, first(snapshotDescr) AS Description, first(snapshotDepth) as Depth, first(filesize) AS size BY filename | eval CreateTimeEpoch=strptime(CreateTime,"%Y-%m-%d %H:%M:%S.%Q") | convert ctime(CreateTimeEpoch) AS CreatedTime | eval Size =`format_bytes(size)` | fields - splitSubPath, CreateTime, CreateTimeEpoch, size | rename filename as Filename $timerange1.earliest$ $timerange1.latest$
Snapshot Statistics for Datastore host host | inputlookup Entity | search type="Datastore" | dedup host | table host | sort host true datastore lowername | inputlookup Entity | search type="Datastore" | search host="$host$" | dedup name | table host, name, moid | sort name | eval lowername=lower(name) | rename name AS datastore true -4h now Snapshot space used on disk |`tstats` values(Inventory.filename) values(Inventory.fileattributes) values(Inventory.Snapshots) values(Inventory.type) from datamodel=VMwareInventory where host="$host$" groupby _time, host, Inventory.moid, Inventory.filename span=10m |`process_inventory` | where lower(filedatastore)="$datastore$" AND lower(filetype)="snapshotdata" | stats first(filesize) as Filesize by _time, host, moid, filename | timechart minspan=10m sum(Filesize) as "SnapshotSpace" $timerange2.earliest$ $timerange2.latest$ Number of Snapshots on datastore |`tstats` values(Inventory.filename) values(Inventory.fileattributes) values(Inventory.Snapshots) values(Inventory.type) from datamodel=VMwareInventory where host="$host$" groupby _time, host, Inventory.moid, Inventory.filename span=10m |`process_inventory` | where lower(filedatastore)="$datastore$" AND lower(filetype)="snapshotdata" | stats first(filesize) as Filesize by _time, host, moid, filename | timechart minspan=10m dc(filename) AS "Total count" $timerange2.earliest$ $timerange2.latest$