VMware Cloud Community
swamynaveen
Enthusiast
Enthusiast

Need PowerCLI script to report or alert Production VM's which are automatically powered off while consolidating disk.

Hello Guys,

Well, Recently in our Environment there was strange issue which we observed and issue was while production VM's disk consolidation was in-progress and was automatically powered off with below errors. Hence, We would like create either powerCLI script or Alarms to proactively send alerts through the email for such impacted  VM list. It would be appreciate if anyone help us in creating PowerCLI scirpt or user defined Alarms.

Thank you in Advance!!

Error:

======

An error was received from the ESX host while powering on VM HYDXXTP14.

Failed to start the virtual machine.

Module DiskEarly power on failed.

Cannot open the disk '/vmfs/volumes/56b2955b-d5fa6351-9665-90e2ba9af8b4/HYDXXTP14/HYDXXTP14-000004.vmdk' or one of the snapshot disks it depends on.

  Could not open/create change tracking file

3 Replies
LucD
Leadership
Leadership

If that error also fired an event, you could create an event alarm.

Can you check if there was an event fired at the time of the error?


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

0 Kudos
swamynaveen
Enthusiast
Enthusiast

Could you pls let me know where can i see such even?

0 Kudos
LucD
Leadership
Leadership

It will involve a bit of detective work.

First check which events were fired at the time of the error message.

Something like this for example

$start = Get-Date '11/19/2016 07:10'

$finish = ($start).AddMinutes(5)

Get-VIEvent -Start $start -Finish $finish -MaxSamples ([int]::MaxValue) |

Group-Object -Property {$_.GetType().Name}

Once we have a list of the events fired during the interval, we will have to try and find out if any of these is actually caused by the error you are seeing.

That will require going a bit deeper into the events that look promising.


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