Still looking into this, however it's got a bit more serious.
Due to the way our software replicates it's databases, if the db VMs hang we could potentially end up in a situation where a large database gets corrupted or even deleted - it can still see the db server and so tries to replicate. We need a resolution to shut down affected VMs in an APD state. I could use esxcfg-mpath to get the state or grep vmkernel.log run from cron but would prefer something built in, or at least have the option to shut a VM down. This is serious for us, and we have a system due to be shipped to a customer in 2 weeks and I need to find a way to do this.
For info: We're on ESXi 5.1.0 U1 with vCenter on 5.1.0 U1a, DBs are propriety to us, and it's the first time we've used HA on out system so this is new territory we were not expecting.
Any ideas? If I script it, what's the best way to trigger it in ESXi? Cron?
I saw a post that was un-replied to from this time last year asking about triggering a script from an Alarm. Would that work? What if vCenter is one of the VMs that get's hit?