WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Auditing vGPU Profile Reconfigurations in vSphere

Auditing vGPU Profile Reconfigurations in vSphere

07.29.2024 by William Lam // Leave a Comment

vCenter Server Events are extremely powerful and contains a ton of useful information, especially for auditing and compliance purposes. As of vSphere 8.0 Update 3, there are over 2.1K+ out of the box events with many more through 2nd and 3rd party integrations.

One of my favorite vCenter Server Event is the VmReconfiguredEvent as it provides complete visibility into every VM reconfiguration change as shared in this blog post back in 2015.

I recently saw an interesting inquiry about being able to audit and track vGPU profile reconfigurations for a VM and of course, vCenter Server Events to the rescue!

Here is a quick PowerCLI snippet which retrieves the latest 1000 vCenter Server Events (you can certainly go back further or add other filters to reduce the initial events) and then look for the VmReconfiguredEvent and check whether there is ConfigChanges.Modified that matches the "vgpu" string, which will indicate a vGPU profile reconfiguration:

$events = Get-VIEvent -MaxSamples 1000

$gpuEvents = $events | where {$_.getType().Name -eq "VmReconfiguredEvent"} | where {$_.ConfigChanges.Modified -match "vgpu"}
$results = @()
foreach ($gpuEvent in $gpuEvents) {
    $summaryLine = $gpuEvent.ConfigChanges.Modified -Split "`n"


    $tmp = [pscustomobject] @{
        VM = $gpuEvent.Vm.Name
        CreatedTime = $gpuEvent.CreatedTime
        UserName = $gpuEvent.UserName
        Change = $summaryLine[0]
    }
    $results+=$tmp
}
$results | Sort-Object -Property CreatedTime

Here is an example output from running the snippet above where we can see several VMs that have had their vGPU Profile has change which includes the original configuration as well as the modified value and of  it will include the date/time and the user who made the change:


The next time you need to track or audit a VM reconfiguration, make sure you look at vCenter Server Events which are consumable both in the vSphere UI (though less useful outside of quickly finding the change) to emitting them to external systems, which of course, the VMware Event Broker Application (VEBA) is one of the easiest way to do that!

More from my site

  • NVIDIA GPU with Dynamic DirectPath IO (Passthrough) to Tanzu Kubernetes Grid (TKG) Cluster using vSphere with Tanzu
  • GPU Passthrough with Nested ESXi
  • ESXi with Intel Arc 750 / 770 GPU
  • Updated findings for passthrough of Intel NUC Integrated Graphics (iGPU) with ESXi
  • Passthrough of Intel Iris Xe Integrated GPU on 11th Gen NUC results in Error Code 43

Categories // Automation, PowerCLI, vSphere 8.0 Tags // GPU, vGPU

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • VMware Flings is now available in Free Downloads of Broadcom Support Portal (BSP) 05/19/2025
  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...