I have been using the below to identify VMs that have been restarted by HA in our environment. Works great but was wondering if there is a way to include the host that experienced the issue causing HA to restart to VM on the target host.
Get-VIEventPlus -EventType "com.vmware.vc.ha.VmRestartedByHAEvent" -Start (Get-Date).AddDays(-30) |Select CreatedTime,@{N="VM";E={$_.Vm.Name}},@{N="HostRestartedOn";E={$_.Host.Name}},@{N="Cluster";E={$_.ComputeResource.Name}},@{N="Datacenter";E={$_.Datacenter.Name}},FullFormattedMessage | export-csv c:\temp\results.csv -notypeinfo
Thanks!
I haven't checked myself yet, but as described in KBKB2036555, one could look for a corresponding event that says "vSphere HA initiated a failover action"
My Event-O-Matic might help in finding that event.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I haven't checked myself yet, but as described in KBKB2036555, one could look for a corresponding event that says "vSphere HA initiated a failover action"
My Event-O-Matic might help in finding that event.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks! I will look into it
"com.vmware.vc.HA.DasHostFailedEvent" did the trick. "vSphere HA initiated a failover action" - "com.vmware.vc.HA.ClusterFailoverActionInitiatedEvent" bring back the Cluster the event occurred.
Thanks again