VMware Cloud Community
vmk2014
Expert
Expert

Finding the list of VM's restarted due to HA in the cluster

Hi All,

Can we find the list of VM's name re-booted due to HA in the cluster from power cli ?

Thanks

V

Tags (1)
0 Kudos
5 Replies
LucD
Leadership
Leadership

The other thread (Get-VIEvent "vSphere HA restarted virtual machine" ) you replied to, should provide that information.

But there seems to be an issue with the Get-Cluster cmdlet.

Does that return anything?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
vmk2014
Expert
Expert

LucD,

We have only 2 cluster and one of the host again again went down and we need to find the VM's restarted due to HA but it throws an error (post in another mail thread). Do you have any idea why the error throws ?

Thanks

V

0 Kudos
LucD
Leadership
Leadership

There could be multiple vSphere connections open?

What does $global:defaultviservers return?

Also, what does the following return?

Get-Cluster -Name 'MDC-Production'


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
vmk2014
Expert
Expert

Get-Cluster : 3/16/2020 8:56:39 AM      Get-Cluster             Sequence contains more than one matching element

At line:1 char:1

+ Get-Cluster -Name 'XDC-Production'

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Get-Cluster], VimException

    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetCluster

Get-Cluster : 3/16/2020 8:56:39 AM      Get-Cluster             Cluster with name 'XDC-Production' was not found using t

he specified

filter(s).

At line:1 char:1

+ Get-Cluster -Name 'XDC-Production'

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (:) [Get-Cluster], VimException

    + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetClu

   ster

Thanks

V

0 Kudos
LucD
Leadership
Leadership

Can you stop/start your PowerShell/PowerCLI session.

Connect to your vCenter, and then try again?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos