VMware Cloud Community
TheVMinator
Expert
Expert
Jump to solution

Viewing Disk Events with get-vievent

How would I use get-vievent  to view all the following?

-All exports of virtual machines from vCenter

-All exports of virtual machines from an ESXi host

-All downloads of vmdk files from a datastore using Vmware client or copy operations on the vmdk from the dcui / ssh console?

The idea is see every time a vmdk may have left the environment.

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You can report on exports (OVA or OVF) with the following

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

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

where{$_ -is [VMware.Vim.TaskEvent] -and $_.Info.DescriptionId -eq 'VirtualMachine.ExportVmLRO'} |

Select CreatedTime,UserName,@{N='VM';E={$_.VM.Name}},FullFormattedMessage,

    @{N='Event';E={$_.Info.DescriptionId}}

Downloading files through the datastore browser doesn't create any events afaik.


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

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

You can report on exports (OVA or OVF) with the following

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

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

where{$_ -is [VMware.Vim.TaskEvent] -and $_.Info.DescriptionId -eq 'VirtualMachine.ExportVmLRO'} |

Select CreatedTime,UserName,@{N='VM';E={$_.VM.Name}},FullFormattedMessage,

    @{N='Event';E={$_.Info.DescriptionId}}

Downloading files through the datastore browser doesn't create any events afaik.


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

Reply
0 Kudos
TheVMinator
Expert
Expert
Jump to solution

ok great thanks!

Reply
0 Kudos