VMware Cloud Community
MRoushdy
Hot Shot
Hot Shot
Jump to solution

Query "lost access to volume" events

Hello,

I need to query all ESXi hosts against "lost access to volume" for datastore issues over a certain period of time please. How?

vEXPERT - VCAP-DCV - Blog: arabitnetwork.com | YouTube: youtube.com/c/MohamedRoushdy
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You can do something liek this

$start = (Get-Date).AddDays(-1)

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

where {$_.FullFormattedMessage -match "lost access"} |

Select CreatedTime,@{N='VMHost';E={$_.Host.Name}},FullFormattedMessage,@{N="Type";E={$_.GetType().Name}}


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

View solution in original post

0 Kudos
4 Replies
Alex_Romeo
Leadership
Leadership
Jump to solution

Hi,

This post by LucD  vSphere events with PowerCLI    solves a case similar to yours, check if you solve with this, otherwise we wait for him to see the post and respond. He certainly knows how to help you.

ARomeo

Blog: https://www.aleadmin.it/
0 Kudos
MRoushdy
Hot Shot
Hot Shot
Jump to solution

This is great, thank you. However, I need the report to include the ESXi hostname if you know how to Smiley Happy.

vEXPERT - VCAP-DCV - Blog: arabitnetwork.com | YouTube: youtube.com/c/MohamedRoushdy
0 Kudos
LucD
Leadership
Leadership
Jump to solution

You can do something liek this

$start = (Get-Date).AddDays(-1)

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

where {$_.FullFormattedMessage -match "lost access"} |

Select CreatedTime,@{N='VMHost';E={$_.Host.Name}},FullFormattedMessage,@{N="Type";E={$_.GetType().Name}}


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

0 Kudos
MRoushdy
Hot Shot
Hot Shot
Jump to solution

Thanks,

vEXPERT - VCAP-DCV - Blog: arabitnetwork.com | YouTube: youtube.com/c/MohamedRoushdy
0 Kudos