VMware Cloud Community
prd
Enthusiast
Enthusiast
Jump to solution

Get-VIEventPlus question

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!

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos
prd
Enthusiast
Enthusiast
Jump to solution

Thanks! I will look into it

0 Kudos
prd
Enthusiast
Enthusiast
Jump to solution

"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

0 Kudos