Hi,
I want to configure some alarms which will send notifications on email but I can't figure it out what type of conditions should I use.
The scenario includes 2 VMs that I want to keep on different hosts from the cluster.
I tried was the following rule:
Targets: All virtual machines in vCenter server servername
Alarm Rules: IF VM connected
Argument vm.name starts with vmname-
Argument host.name equal to first-cluster-name (where both vm runs)
THEN trigger the alarm as warning and send emails
OR IF VM connected
Argument vm.name starts with mobileweb-
Argument host.name not equal to second-cluster-host
THEN trigger the alarm as normal and send emails
But I'm almost sure that this is wrong, at least the host argument.
I can't figure it out how to configure the rules in order to get notified when both VMs are running on the same host.
Any help will be appreciated.
Best regards.
A cluster enabled for DRS?
If so, leave your cluster fully automated and create a VM-VM Affinity Rule: Create a VM-VM Affinity Rule
You should not then need your alarm.
Sorry but I forgot to mention that used license is a standard one so DRS is not supported.
So out of curiosity, what will you/someone do if you get such an email alert?
Get informed that both VMs are running on the same host.
Since is not critical, can be ignored or can manually migrate the VM.
I intend to create e powercli script, but the first step is this notification.
That's what I was driving at. Since you can't afford a license for DRS, which would be the "correct" way to go about this, I'd rather invest in building the automation to ensure that this is remediated *without* having to notify a person. Doing this in PowerCLI would not be complex. You could then schedule the script to run on a regular basis. Since you have vCenter Server, you also have a license to vRO and could do it there as well. And all of this without having to notify you.
I agree about the DRS but since I'm not the one who can decide this, I have to work with what is available.
I want this alarm because the script can be executed when the condition is met and a notification is send, so I know that something might be wrong.
Also, the script will contain no condition, just move vm to other node.