{"id":778,"date":"2017-08-16T12:39:33","date_gmt":"2017-08-16T10:39:33","guid":{"rendered":"http:\/\/vblog.hochsticher.de\/?p=778"},"modified":"2017-08-16T14:41:24","modified_gmt":"2017-08-16T12:41:24","slug":"got-a-psod-check-which-vms-restarted-by-ha","status":"publish","type":"post","link":"https:\/\/vblog.hochsticher.de\/?p=778","title":{"rendered":"Got a PSOD? Check which VMs restarted by HA!"},"content":{"rendered":"<p>We design highly redundant Datacenters, Clusters, Storage Systems and even Networks, but in the end we still have some unplaned outages :\/<\/p>\n<p>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.<\/p>\n<p>Check out a PowerCLI one liner to find the restarted VMs!<\/p>\n<p><!--more--><\/p>\n<pre class=\"lang:ps decode:true \" title=\"Find-HA-restarted-VMs\">$Date=Get-Date\r\n$HAVMrestartold=1\r\n\r\nGet-VIEvent -maxsamples 100000 -Start ($Date).AddDays(-$HAVMrestartold) -type warning | Where {$_.FullFormattedMessage -match \"HA restarted\"} |select CreatedTime,FullFormattedMessage |sort CreatedTime -Descending\r\n\r\n# The Output might be something like this:\r\n\r\nCreatedTime         FullFormattedMessage                                                                                                   \r\n-----------         --------------------                                                                                                   \r\n16.08.2017 06:27:33 vSphere HA restarted virtual machine Test-VM-01 on host My-VMHost01 in cluster My-Cluster               \r\n16.08.2017 06:27:10 vSphere HA restarted virtual machine Test-VM-02 on host My-VMHost02 in cluster My-Cluster              \r\n16.08.2017 06:26:52 vSphere HA restarted virtual machine Test-VM-03 on host My-VMHost06 in cluster My-Cluster          \r\n16.08.2017 06:26:48 vSphere HA restarted virtual machine Test-VM-04 on host My-VMHost01 in cluster My-Cluster     \r\n16.08.2017 06:26:47 vSphere HA restarted virtual machine Test-VM-05 on host My-VMHost05 in cluster My-Cluster              \r\n16.08.2017 06:26:43 vSphere HA restarted virtual machine Test-VM-06 on host My-VMHost06 in cluster My-Cluster<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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!<\/p>\n","protected":false},"author":1,"featured_media":779,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[4,7],"tags":[],"class_list":["post-778","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powercli","category-vsphere"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/vblog.hochsticher.de\/index.php?rest_route=\/wp\/v2\/posts\/778","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vblog.hochsticher.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vblog.hochsticher.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vblog.hochsticher.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vblog.hochsticher.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=778"}],"version-history":[{"count":6,"href":"https:\/\/vblog.hochsticher.de\/index.php?rest_route=\/wp\/v2\/posts\/778\/revisions"}],"predecessor-version":[{"id":785,"href":"https:\/\/vblog.hochsticher.de\/index.php?rest_route=\/wp\/v2\/posts\/778\/revisions\/785"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vblog.hochsticher.de\/index.php?rest_route=\/wp\/v2\/media\/779"}],"wp:attachment":[{"href":"https:\/\/vblog.hochsticher.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vblog.hochsticher.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vblog.hochsticher.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}