Problem: After removing and subsequently re-adding any number of VMs from/to the inventory, the number of active/inactive VMs per cluster reported by the VMware Data Adapter no longer matches the number of active/inactive VMs shown in VMware Infrastructure. As a result, the Allocated vCPU/vRAM reports are also not consistent with the data shown in vCenter.
Cause: Removing a virtual machine from the inventory unregisters it from the host and vCenter Server, but does not delete it from the datastore. To be re-added, it just needs to be re-registered. To collect values against the CONF_ENTITY_ACTIVE_FLAG metric, which is used to build the SERVER_DIM_ACTIVE_VIEW metric, the VMware Data Adapter is currently using the vim.event.VmCreatedEvent event only, not the event that is triggered at re-registration (vim.event.VmRegisteredEvent) of the VMs and which reactivates them in vCenter.
Solution: