VMware

Not Another Suite of Scripts! | Main | Read about the financial meltdown and your VMware meltdown all in one place

November 01, 2008

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

Get-VM | Get-TkeSnapshotExtended | Select Name, VM, SizeMB

Here's some sample output:

Shot2 

Hope that helps!

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c328153ef010535cabac4970b

Listed below are links to weblogs that reference Ever wonder how big your snapshots are?:

Comments

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...

Carter Shanklin

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

Post a comment

If you have a TypeKey or TypePad account, please Sign In.