Got a PSOD? Check which VMs restarted by HA!

Got a PSOD? Check which VMs restarted by HA!

We design highly redundant Datacenters, Clusters, Storage Systems and even Networks, but in the end we still have some unplaned outages :/

This week we had a defect Memory DIMM that caused a PSOD on one ESXi Host. HA restarted the VMs fine, but we want to know quickly which VMs restarted.

Check out a PowerCLI one liner to find the restarted VMs!

$Date=Get-Date
$HAVMrestartold=1

Get-VIEvent -maxsamples 100000 -Start ($Date).AddDays(-$HAVMrestartold) -type warning | Where {$_.FullFormattedMessage -match "HA restarted"} |select CreatedTime,FullFormattedMessage |sort CreatedTime -Descending

# The Output might be something like this:

CreatedTime         FullFormattedMessage                                                                                                   
-----------         --------------------                                                                                                   
16.08.2017 06:27:33 vSphere HA restarted virtual machine Test-VM-01 on host My-VMHost01 in cluster My-Cluster               
16.08.2017 06:27:10 vSphere HA restarted virtual machine Test-VM-02 on host My-VMHost02 in cluster My-Cluster              
16.08.2017 06:26:52 vSphere HA restarted virtual machine Test-VM-03 on host My-VMHost06 in cluster My-Cluster          
16.08.2017 06:26:48 vSphere HA restarted virtual machine Test-VM-04 on host My-VMHost01 in cluster My-Cluster     
16.08.2017 06:26:47 vSphere HA restarted virtual machine Test-VM-05 on host My-VMHost05 in cluster My-Cluster              
16.08.2017 06:26:43 vSphere HA restarted virtual machine Test-VM-06 on host My-VMHost06 in cluster My-Cluster

 

One thought on “Got a PSOD? Check which VMs restarted by HA!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close