Most awesome ESX script known to mankind ever
Here is the most awesome ESX script known to mankind (by mankind I mean me) ever in the history of time (by ever I mean at least this week).
SnapVMX by Mr Ruben Garcia
I’ve being driving myself crazy over the last week trying to manually re-chain some horribly complicated and completely broken snapshots. This script (under a GPL3 license) analyses the complete snapshot chain and tells you exactly where there are broken links or missing files. It even reports exactly how much space you’ll need on the home datastore to commit them all. All automagically.
I was going to follow the link to this script with a detailed explanation of how snapshots work, how they commonly break and of course how to fix up the mess. However, it seems the author of the SnapVMX script has also written a paper (under a Creative Commons license) explaining the details more effectively than I could. It’s great read if you want to learn more about the inner workings.
Troubleshooting Virtual Machine snapshot problems by Mr Ruben Garcia
It even explains how to commit the individual disks of a VM, if room is tight on the datastore. And has this nice flowchart to help suppress the inevitable panics when the snapshots go South.
Rubian – if you make it VMworld this year, please make yourself known to me to redeem your free beer token.
11 Responses to Most awesome ESX script known to mankind ever
Leave a Reply Cancel reply
Forbes Guthrie
Recent Posts
- vSphere 5 vReference Card released
- Cisco UCS boot from iSCSI SAN – ESXi design consideration
- vSphere 5 vReference card – Storage section
- Does 2008 R2 Failover Clustering require a change to the Notify Switches policy?
- vSphere 5 vReference card – Host section
- vSphere 5 vReference card – Install section
- Auto Deploy design concern
- vSphere 5 vReference card – vCenter section
- vSphere 5 vReference card – VM section
- vSphere 5 vReference card – availability section
Recent Comments
- escorts service on VMworld: Host Profiles
- free antivirus software download on Firewall port connection diagram
- Tim Sommer on vSphere 5 Card
- vJohnnyF on vSphere 5 Card
- Forbes Guthrie on Cisco UCS boot from iSCSI SAN – ESXi design consideration
- Chris on Cisco UCS boot from iSCSI SAN – ESXi design consideration
- Forbes Guthrie on vSphere 5 Card
- Forbes Guthrie on vSphere 5 Card
- harold on Auto Deploy design concern
- MarcelVanOs on vSphere 5 Card
Twitter
- Eek! This is big >> RT @DuncanYB: New Article: No Jumbo frames on your Management Network - http://t.co/VjoCtOqz : 2 weeks ago
- RT @ryanbirk: @forbesguthrie ...owe you a beer! Read all 50 pgs of your notes and passed the VCI-5 exam this morning << Congrats, great news : 2 weeks ago
- Working with Host Profiles today. Clunky, but a great tool. : 2 weeks ago
- @csilvertooth Frustrating yeah, they maybe need a popup warning message check when you start it without correct permissions. #VMware : 2 weeks ago
- RT @joshcoen: Passed VCP5 this morning. Big shout out to @jaslanger and @forbesguthrie #invaluableresources. << Congrats! : 2 weeks ago
- RT @cwjking: @forbesguthrie Someone commented on my blog to link to your site for VCP5 related stuff. http://t.co/7KqZsNuv << thx : 2 weeks ago
- @sanchezhutz Nice, I hear lots of good things about those. David is nice chap. : 3 weeks ago
- .RT @cxi: I'll be in Vancouver the week of the 23rd ;) << Great. Anyone else in Vancouver up for vBeers? I'm free 23,25,27 /cc @astorrs : 3 weeks ago
- @sanchezhutz Best of luck Sanchez! When are you planning to take it mate, work paying for it? : 3 weeks ago
- New blog post: vSphere 5 vReference Card released - http://t.co/4rYEPsM9 : 3 weeks ago







Forbes – love it, any thoughts on entering our ESXi scripting contest ? Chance to win up to $2500 – for contest details visit http://vmware.com/go/scriptomania
Hi Pablo,
I’d love to take the credit, but I’m just the messenger. All credit should really go to Ruben Garcia who created the script. Also, the script needs a python runtime environment. It might work with the vMA, but I know if anyone has tested it with ESXi hosts.
Anyway, all props to Ruben.
SnapVMX now works on ESXi too.
See the documentation for instructions.
Fantastic, thanks!
Hi Forbes,
I’m glad that you liked the guide and the script.
A few days ago I reviewed, updated and expanded the troubleshooting guide.
Additions:
- Full procedure explanation with examples of how to commit manually to the Base Disk
- References to ESXi 3.5/4.0 and ESX 4.0 with differences and commands.
- List of weird issues (knowledge gained from experience)
- Small animation explaining the ‘delete all’ process.
- More links to patches.
- Recommendations to prevent issues.
- More pictures for “clone VM” stressing the possibility of putting the disks on different Datastores.
- Reviewed flowchart to make it a bit simpler.
- vmkfstools -q tricks.
Ah! Thanks for the compliment.
Thanks for letting us know, I’ve had a quick look at some of the changes and it looks great.
If I might be so bold, a suggestion for your site would be to have the script as a separate downloadable sh file. A couple of readers noticed that the formatting kept getting messed up when they copy/pasted from their browser.
P.S. I love the animated gif.
I have included the downloadable file as requested and some other stuff.
I’m always willing to improve the pages, so feel free to ask.
Regards.
Thanks Ruben, that’s great. Do you have a URL for the downloadable file as I couldn’t spot it?
File:
http://geosub.es/vmutils/SnapVMX.Documentation/SnapVMX.source.code.txt
Command to retrieve and load it:
# wget http://geosub.es/vmutils/SnapVMX.Documentation/SnapVMX.source.code.txt && source SnapVMX.source.code.txt
Don’t miss these patches.
http://vmutils.blogspot.com/2010/07/possibly-end-of-snapshots-story.html
They introduce a great improvement that changes drastically the snapshots troubleshooting and the most important, prevent the problem.
Nice write up! These patches are very good news.
Thanks for letting us know.