I wrote this script about a year ago to deal with errant SMVI snapshots, and was drafting this blog post when my rss feed caught me off guard. It appears Matt Robinson has beat me to the punch line. He has produced a Perl script that cleans up any leftover snapshots, but if you favor a PowerShell approach… I give you Remove-SMVISnapshots.
I can personally attest to it’s usefulness, imagine walking into this little time bomb. It took 36 hours, but my little script that could chewed through all 370 ESX snapshots. I now deploy this script as a standard part of any SMVI installation. Running it as a scheduled task on the SMVI server 30 min after the nightly backups. I haven’t tested running it as a post action in SMVI v2, but I see no reason this wouldn’t work.
To be clear I Love SMVI it is a Critical piece of our Virtual Infrastructure. With out SMVI we wouldn’t be able to meet over half our SLA’s. I’ve talked to folks throughout the NetApp chain, and they are really working on fixing this one! Until that day, Just remember PowerShell, Cures what Ails Ya!
P.S. Again with the complexity… Perl 1500 lines / PowerShell 160 lines of very verbose code… any questions!