Time UTC of handler (Get-VIEventPlus)

I use the function Get-VIEventPlus of Luke to monitor events in failover HA.

However, when you export the events I noticed that the event handler that is used by this function has the time to UTC, which gives me a shift of 2 hours during the summer period.

PowerCLI C:\ > (Get-view EventManager). LatestEvent.CreatedTime.Kind

UTC

While the regular Get-VIEvent command uses local time (I guess times the vCenter Server):

PowerCLI C:\ > (Get-VIEvent |) Select - 1 first). CreatedTime.Kind

Local

I solve this 'problem' using the .NET method. ToLocalTime() to get reports that is not misled people unfamiliar with the UTC format:

$Event.CreatedTime.ToLocalTime)

But I wonder if anyone knows why the event handler uses UTC while Get-VIEvent uses local time, and if you can change it somehow? Whence the event Manger get timestamps?

And a bonus would be if anyone knows if I see what ESX host rebooted AP VM has been placed on the front the reboot?

VSphere servers follow events in UTC, because these servers can be in different time zones.

The Get-VIEvent cmdlet converts the UTC to localtime.

As far as I know, this behavior is not configurable.

Surveys I've done for my failover HA VM monitoring post, there is no easy way to find where a VM was organized before the HA event.

You can run a daily inventory and a record where a virtual machine is running.

An alternative is to find what node ESXi failed and makes HA to take these steps. But it is not infallible.

Tags: VMware

Similar Questions

Maybe you are looking for