This KB article provides the steps for clearing a stale, or otherwise stuck task from the vCenter "Recent Tasks" panel.
Please see the other common stuck or stale task KB's below:
Troubleshooting virtual machine power on task hangs (342633)
HA configuration task is stuck for long time or fails with Configuration error after an ESXi host update in the cluster (369999)
ESXi host stuck "in progress" when entering maintenance mode (318773)
Clear any stale backup tasks from vCenter UI. (378061)
[VMC on AWS] Clear stale HCX tasks within vCenter (319152)
[VMC] SRM task hung on vCenter Server (335248)
Stuck tasks -- "Recompute Datastore Groups" and "Recompute Device Groups" in vSphere Client (384687)
Important: Do not cancel snapshot consolidation tasks. Doing so has a high chance of corrupting the VMs virtual disks.
You can monitor the consolidation task progress using the commands in Collecting information about tasks in VMware ESXi
If a snapshot consolidation task is stuck you can review the below KB's or open a case with Broadcom Support for assistance.
Snapshot removal task stops at 99% (341355) - From the KB: The is no way to stop or cancel the consolidation process without risking data corruption.
Unable to power on a virtual machine after cancelling snapshot consolidation (318793) - From the KB: These processes should not be cancelled at any time. Cancelling these processes has a very high chance of causing virtual disk corruption.
Before removal of the stale task validate if the task in question has completed successfully or not. If it did not complete and is still present in the Recent Tasks panel then proceed with the following steps.
Additionally before making changes to the vCenter Server ensure to take a valid snapshot of the vCenter Server Virtual Machine. If the vCenter is in Enhanced Linked Mode (ELM), take offline snapshot of all vCenter Servers in the Single Sign-on domain, for more details please see: VMware vCenter in Enhanced Linked Mode pre-changes snapshot (online or offline) best practice
The first method to clear a stuck task is to restart the vsphere-ui and vpxd services. To clear a stale task without a restart of these services see the next section "Using the Managed Object Browser (MOB) Task Manager to clear a stale task"
The second method to clear a stale task is to use the MOB Task Manager and modify the task state directly to success.
If removing the stale task within the vCenter is not successful, please create an SR (Creating and managing Broadcom support cases) with Broadcom Support for further assistance clearing the stale task from vCenter.