Home > Blogs > VMware PowerCLI Blog


Ever wonder how big your snapshots are?

I often call snapshots "the silent datastore killer". When you create a snapshot, the system records the difference between the current state and the state when the snapshot was made in something called a delta file. The delta file can grow to be as big as the base disk itself if you write a lot of data to it. If you create a snapshot of that snapshot, the process begins again, and that snapshot can also grow to be as big as the base disk.

I’ve personally filled up many a drive with snapshots that I’ve forgotten about. When your datastores fill up, any VM trying to expand files on that datastore (for example if it has snapshots it is trying to grow) will freeze until some space becomes available. It’s a real disaster and I’ve even heard of people going so far as to disable snapshots entirely.

The trouble is that VI Client doesn’t give you an easy way to figure out how big snapshots are. Even if it did, do you really want to sift through dozens or hundreds of VMs on a regular basis looking for big snapshots manually? We need automation to solve this problem.

A new cmdlet in the VI Toolkit Extensions can help. Get-TkeSnapshotExtended adds a property called SizeMB to snapshot objects. To use it, load the VI Toolkit Extensions (in PowerShell v2 CTP2 or higher) and run

Here’s some sample output:

Shot2 

Hope that helps!

2 thoughts on “Ever wonder how big your snapshots are?

  1. Kimono

    Does this only take into account snapshots registered within VC database? We ocassionally get detached delta files that are on the datastore, but not in the Database. Hence we still run snaphunter from the first host in every cluster, and just report on all delta files…

    Reply
  2. Carter Shanklin

    The extensions also has a cmdlet called Get-TkeOrphanedVmdk. Running these two cmdlets might give you what you’re looking for.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*