In the VMware vCenter Server UI, users may encounter a task-related error when viewing or managing Virtual Machines. The following error message is observed: The object 'vim.Task:task-XXXX' has already been deleted or has not been completely created. This typically occurs when the vCenter task database or the management agent loses track of a specific task ID associated with the VM's state.
The error is caused by a stale task reference in the vCenter Server inventory or a synchronization mismatch between the ESXi host management agents (hostd) and vCenter Server regarding the VM's current task state.
To resolve this issue and refresh the VM's state in the inventory, perform a manual migration (vMotion) to reset the management hooks:
vSphere Client.Migrate.Change compute resource only and move the VM to a different ESXi host in the cluster.