Unable to add newly created VMs to security tag and they do not appear when listing associated VMs under the dynamic group.
search cancel

Unable to add newly created VMs to security tag and they do not appear when listing associated VMs under the dynamic group.

book

Article ID: 325620

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • When creating a VM and adding a security tag to it. This VM does not show in the associated VM under the Edge Gateway > Security > Dynamic Groups > Dynamic Group in the Cloud Director UI.
  • The NsxTVmTaggingJob activity is not running on any Cell, or the Next Start Time for this scheduled activity is in the past when checking for the activity on all the Cells with the cell management tool:
/opt/vmware/vcloud-director/bin/cell-management-tool cell -i $(service vmware-vcd pid cell) -tt | grep "Next Start Time\|NsxTVmTaggingJob"

| UUID                                 | Previous Start Time     | Next Start Time         | Status          | Job Name                                   |
| <SCHEDULED_ACTIVITY_UUID>            | 2023-10-13 11:41:57.028 | 2023-10-13 11:42:27.075 | STATUS_QUEUED   | NsxTVmTaggingJob                           |


Environment

VMware Cloud Director for Service Provider 10.x
VMware Cloud Director 10.x

Cause

The NsxTVmTaggingJob activity is responsible for ensuring associated VMs will be visible in Dynamic Groups.
The NsxTVmTaggingJob activity should be running on one Cell in the the Cloud Director Cell cluster, and the Next Start Time should continually be updated with a future date after each run of this scheduled activity.
If the

Resolution

Use the fail-tasks command of the cell management tool on one Cell in the cluster after shutting down the Cloud Director service on all Cells to attempt to reset the activities including the NsxTVmTaggingJob activity.

Details on how to use the fail-tasks command are outlined in the Cloud Director documentation here, Update the Failure Status of a Task in VMware Cloud Director.

The Cloud Director service can be started again on the Cells after running the command.

If issues persist with after taking these steps please open a Support Request with VMware Support.



Additional Information

Assign Security Tags to Virtual Machines
Update the Failure Status of a Task in VMware Cloud Director


Impact/Risks:
Ensure the Cloud Director service is stopped on all Cells before attempting to update the status of a failed task or activity using the fail-tasks command of the cell management tool.
You cannot use the fail-tasks command unless all cells have been shut down.