Clear HA alarm on all VMs

Recently I ran into an issue where HA triggered on a cluster but failed. This generated an alert on several hundred VMs. Hating to click each one to reset the alarm that wasn’t clearing I found the following solution.

  1. PowerCLI to vCenter
  2. Run the following command to disable the alarm
  3. Get-AlarmDefinition "vSphere HA virtual machine failover failed" |Set-AlarmDefinition -Enabled:$false
  4. The alarm should clear almost instantly for all VMs
  5. Re-enable the alarm
  6. Get-AlarmDefinition "vSphere HA virtual machine failover failed" |Set-AlarmDefinition -Enabled:$true

Leave a comment