I am going to try scripting it; but it does look like it is the only way.
I have 2 other questions related to alarms but not about shutting down a VM.
Question 1: When I create an alarm on a VM's memory usage(%), is vCenter monitoring the guest OS's memory usage % or how much memory is granted to the VM, i.e how much of the host's memory is being given to the VM?
Question 2: I have assigned 4 GBs of RAM to a VM. On this VM I ran a memory stress tester and maxed out the memory usage at 99%. I started a second memory stress test on the very same machine (to push it over 100% memory usage just to see what happens) and I got a alarm that the HOST this VM is running on is at 90% usage.
Does ESXi grant more memory to a VM if it sees that the guest OS is using up all its RAM?