VMware vCenter ServerVMware vCenter Server 7.0VMware vCenter Server 8.0
Issue/Introduction
To provide steps on how to clear stale vCenter UI tasks :
Symptoms :
Customer may see stale backup tasks on vCenter "Recent Tasks" field. Actual backup task has already completed successfuly without any errors.
Environment
VMware vCenter Server 7.0
VMware vCenter Server 8.0
Resolution
To remove the stale task please refer the below step :
(Note : First Validate if the task has actually completed successfully or not . And, take valid snapshot of the vCenter before proceeding. If the vCenter is in linked mode, take offline snapshot of all vCenters in linked mode)
Restart the vsphere-ui service with this command : service-control --stop vsphere-ui && service-control --start vsphere-ui
If the above step do not work, refer below :
Restart the vmware-vpxd service with this command : service-control --stop vmware-vpxd && service-control --start vmware-vpxd
Note : This will clear the stale task from the vCenter UI, but stale task might again reappear if the respective task is initiated by Customer and again remain as stale. And, even after increasing vpxd or vsphere-ui heap memory the stale task is observed.
If the above step do not work, refer below :
Collect the task's 'Id' from powercli.
To Connect vCenter to powercli run the following command in a PowerCLI enabled PowerShell session:
connect-viserver –server〈vCenter IP or vCenter FQDN)
It will prompt for credentials. Enter complete sso credentials ( [email protected] )
Run this command to list the tasks : get-task -status "Running" | fl
Make a note of the task Id
Go to vCenter MOB - https://vcenter_FQDN>/mob/?moid=TaskManager
It will prompt for credentials. Enter complete sso credentials ( [email protected] )
Manually inspect individual tasks listed at recentTask field - the info property should detail the task type, current state and startTime.
Compare the task Id in the above recentTask field with the task Id collected from above Step 1.1.4
Once the task is identified, invoke SetTaskState with parameters: state: success . And, for result and fault section: set to empty values.
Refresh the vCenter UI.
Please Note: A restart of the VPXD service may be needed.
Additional Information
Impact/Risks:
There should be no impact to the vCenter functionality. This is just a stale task that is seen within the vCenter that can be removed by following the above resolution steps.