Troubleshooting virtual machine power on task hangs
HA configuration task is stuck for long time or fails with Configuration error after an ESXi host update in the cluster
ESXi host stuck "in progress" when entering maintenance mode
Clear any stale backup tasks from vCenter UI.
[VMC on AWS] Clear stale HCX tasks within vCenter
[VMC] SRM task hung on vCenter Server
Stuck tasks -- "Recompute Datastore Groups" and "Recompute Device Groups" in vSphere Client
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
Snapshot removal task stops at 99% - 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 - 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, 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"
service-control --stop vsphere-ui && service-control --start vsphere-uiservice-control --stop vmware-vpxd && service-control --start vmware-vpxdIf you can't access the vCenter Server appliance for any reason or the root account happens to be locked due to a forgotten password to perform troubleshooting, reboot the vCenter Appliance as this will free the hung process as well.
The second method to clear a stale task is to use the MOB Task Manager and modify the task state directly to success.
descriptionId, current state, and startTime.If removing the stale task within the vCenter is not successful, contact VMware by Broadcom support for further assistance: Creating and managing Broadcom support cases.