The underlying products (vSphere, vSAN & NSX) that run within VMware Cloud on AWS (VMC) are constantly being improved with new capabilities and enhancements. As a service, VMC is updated more frequently than a traditional on-premise environment and one huge benefit for our customers is that they get to access all the latest and greatest features of the platform!
Yesterday, I came to learn about some improvements that we had made to our vSphere Tagging infrastructure to start publishing vCenter Server Events for when a vSphere Tag is attached or detached from an inventory object such as a Virtual Machine. This has been a frequently requested feature by our customers, especially for auditing purposes and this also enables the ability to perform additional actions through the use of a vCenter Alarm.
UPDATE (10/13/20) - vSphere 7.0 Update 1 now includes vCenter Events for both vSphere Tag Attach/Detach operations. For complete list of out of the box vCenter Server Events, you can refer to this Github repo.
In the vSphere UI for a VMC vCenter Server, you can now see these new tagging events by selecting the vCenter Server inventory object and then go to Monitor->Events and filter by "attached tag" or "detached tag".
The two new tag events are defined by the following new event types in vCenter Server:
- com.vmware.cis.tagging.attach
- com.vmware.cis.tagging.detach
This also means that you can programmatically retrieve these events using the vSphere API or any of the supported vSphere SDKs including PowerCLI.
Here are some examples using PowerCLI and the Get-VIEvent and filtering by the two new event type:
Get-VIEvent | where {$_.EventTypeId -match "com.vmware.cis.tagging.attach"}
Get-VIEvent | where {$_.EventTypeId -match "com.vmware.cis.tagging.detach"}
One thing that I did notice is that we currently do not publish events for basic CRUD (Create, Update & Delete) operations for vSphere Tags as well as Tag Categories, I know this is probably something customers would also like to see in addition to attaching and detaching a tag. Hopefully this is something that can also be improved in a future update and let us know if this is something you would be interested in or if there are other scenarios related to tags that should be captured as part of our vCenter Event stream.
رزرو هتل says
this article is amazing
thank you so much
it is very useful
virt.ninja says
Any idea of how soon this will make it into on-premise vSphere? We need this!
virt.ninja says
6 months on, any word of this making it into an on premise vCenter release?
Brian Phipps says
The problem that I've just determined, is that these events are associated with the friendly name of the object on which they are triggered and not the MOID. There is therefore no means to correlate these back to the originating object, when for example you have two virtual machines with the same name.