Nutanix - Article

Removing stuck task – Running Nutanix AHV

I happened to run into a problem where one of my Nutanix tasks refreshing the Life Cycle Management inventory just stopped progressing.

All the sub-tasks had either completed or failed but the parent task was still stuck as a “running” task; not progressing at all.
To make sure it actually was stuck, I gave it plenty of time to either finish or time-out but that never happened. Not being in a hurry, I let it run for more than a week before I started digging into how to actually remove the task.

Stuck Task - Nutanix

Unfortunately, when getting into this, looking about with the help of Google and the Nutanix Community forums I still couldn’t figure out the correct way to fix this. The solutions I found were for older AHV versions and the commands were no longer available for the version I was running (5.5.4).

After version 5.5 the task.update command for acli was removed. This was the previously posted solutions online, and that would explain why I couldn’t get the task removed myself.

From 5.5 onwards the new command that needs to be run is done through ecli (Ergon). The command in question is ergon_update_task.

nutanix@NTNX-A-CVM::~$ ecli task.list include_completed=false
Task UUID Parent Task UUID Component Sequence-id Type Status
3f814122-0bd8-4cc4-af3d-f17763c2e7f0 lcm 1 kLcmInventoryOperation kRunning

nutanix@NTNX-A-CVM::~$ ergon_update_task --task_uuid='3f814122-0bd8-4cc4-af3d-f17763c2e7f0' --task_status=succeeded
WARNING: Using this command can cause database corruption and complete system failure, if used improperly.
Are you sure you want to continue? (y/n)

nutanix@NTNX-A-CVM::~$ ecli task.list include_completed=false
Task UUID Parent Task UUID Component Sequence-id Type Status


Notice the warning when running this command. Really make sure that this is a task that you safely can force to complete before applying it for your cluster. If you’re ever unsure, contact Nutanix Support. As in my case, this is a lab-cluster where breaking something wouldn’t be much of a problem.

I hope this quick-tip could help you solve your stuck task(s) in Prism!

Published by Fabian

Avatar for Fabian
Solutions Architect / Systems Engineer. Virtualization, Automation, Networking and more.

2 comments on “Removing stuck task – Running Nutanix AHV”

    1. It certainly is a risk for sure, which is why one should never do this without having Nutanix Support assistance.
      In my case, it was on my lab-cluster and a worst-case scenario where I would have to rebuild everything from scratch would be totally fine.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.