Using vSphere/ESXi alarms to power on a VM

Associate
Joined
1 Dec 2005
Posts
803
What I want to do (ideally) is power on a particular VM when a specific host is unavailable.

I have a VM on host A that is replicated to host B every hour using Veeam. I've been looking at the alarms and seeing what I can configure (still learning this side of things). If I create the alarm on hosts to monitor if host A goes down, I can't specify a VM to start in the actions. If I create the alarm on VMs and I have my triggers looking at the VM on host A to see if it is powered off or disconnected, I can't then specify the VM to start in the actions (presumably the action has to apply to the VM defined in the trigger(s)?).

Is this doable without needing to write scripts? Or have I missed something? I can't use HA for this as the VM I want to protect uses local storage.

Cheers :)
 
Thanks img.

I've had a play around with PowerCLI and have a simple 2 line PowerShell script with the right commands in it. If I set the alarm action to the script path, will it automatically run in the context of PowerCLI or does my .ps1 script need to import anything before running any PowerCLI commands?
 
I can understand why you'd want to do this, but don't you think this is more than a little bit risky, depending on what would happen if you end up with the VM running on both hosts?

I presume your hosts are over a wider geography than would allow vMotion/HA and this is your solution? Also, Veeam is best at doing the failover/failback because it'll track it properly. I've not actually tested what happens if you manually power on a replica, but I can't imagine it would be pretty.
 
Back
Top Bottom