You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, I believe this is a limitation in vSphere Tagging when it is triggered through PowerCLI which might be using a different backend API than the one used by vSphere. Since the vCenter Event isn't being generated, VEBA won't receive any event.
I would recommend filing an SR w/VMware Support to identify the API, so that you could initiate via PowerCLI to get the same behavior as vSphere UI, but this isn't a defect with VEBA itself as vCenter Server itself isn't producing the event in the first place
Describe the bug
When using PowerCLI to tag a VM no event is registered.
To Reproduce
Run the following PowerCLI script (update values as needed)
$vmName = "VMName"
$categoryName = "Category"
$tagValue = "TagValue"
$clusterName = "ClusterName"
$vCenter_FQDN = "vCenter IP or DNS Name"
$credential = Get-Credential -Message "Enter your vCenter credentials"
Connect-VIServer -Server $vCenter_FQDN -Credential $credential
$cluster = Get-Cluster -Name $clusterName
$vm = Get-VM -Name $vmName -Location $cluster
$category = Get-TagCategory -Name $categoryName
$tag = Get-Tag -Name $tagValue -Category $category
New-TagAssignment -Tag $tag -Entity $vm
Here is the output from running the script:
Name Port User
vcenter_server 443 domain.com\UserName
Uid : /VIServer=domain.com\UserName@vcenter_server:443/VirtualMachine=VirtualMachine-vm-2111/TagAssignment=/Tag=urn:vmomi:InventoryServiceTag:b74
7ab6f-c49c-4593-9578-8ab5e3c96e2f:GLOBAL/
Tag : category_name/tag_value
Entity : vmautotag-99
Id : com.vmware.cis.tagging.TagAssociationModel
Name : com.vmware.cis.tagging.TagAssociationModel
Expected behavior
The following event should have been generated:
{
"Key": 109354,
"ChainId": 109354,
"CreatedTime": "2023-07-18T19:06:56.401Z",
"UserName": "domain.com\UserName",
"Datacenter": null,
"ComputeResource": null,
"Host": null,
"Vm": null,
"Ds": null,
"Net": null,
"Dvs": null,
"FullFormattedMessage": "User domain.co\UserName attached tag tag_value to object vmautotag-99",
"ChangeTag": "",
"EventTypeId": "com.vmware.cis.tagging.attach",
"Severity": "info",
"Message": "",
"Arguments": [
{
"Key": "Tag",
"Value": "tag_value"
},
{
"Key": "Object",
"Value": "vmautotag-99"
},
{
"Key": "User",
"Value": "domain.com\UserName"
}
],
"ObjectId": "",
"ObjectType": "",
"ObjectName": "",
"Fault": null
}
Version (please complete the following information):
Additional context
Adding/Removing tags through the UI works as expected.
The text was updated successfully, but these errors were encountered: