On the internet there a some nice scripts for shutting down vm's and esxi hosts to use with ups software. Unfortunately they can't be used for the really small environments like one esxi host and a couple of vm's.