VMware {code} Community
RUG201110141
Enthusiast
Enthusiast

perl script to for finding vm's with snapshots

Has anybody developed a script for finding virtual machines in there environment that have snapshots?

0 Kudos
3 Replies
StefanPahrmann

Check this out from the danish vmware user group:

Findsnapshots

It's written in perl and you need to modify some lines inside the code.

I haven't tried it by myself (but I will look at it soon).

Regards

Stefan

hicksj
Virtuoso
Virtuoso

Attached is what I use... feel free to hack it up.

Message was edited by: hicksj

I have a cron job that runs this weekly... Sends an email out to us admins, minimizing stale/perpetual snapshots.

0 Kudos
dinny
Expert
Expert

Hiya,

I have found that snapshots do get in to a mess sometimes, and that VC does not always hold the correct info in these cases - so I quite like the snap_hunter script by Mittel from Xtravirt. That bases its info on an "ls" of the vmfs volumes on one of the ESX servers in the datacenter:

http://www.xtravirt.com/index.php?option=com_remository&Itemid=75&func=fileinfo&id=19

If you like that - I have added a bit more functionality to it - but am waiting for Alex to review it and publish it (if he likes it). If you give me your email address (or PM me with it) - I can send you a copy of the amended version.

Dinny

0 Kudos