VMware vCenter – Another Task Is Already In Progress

If you’ve ever tried to execute a task in vCenter only to be told that another task is already in progress but you can’t see it then this post may be of use to you.

In this example I tried to initiate a removal of all snapshots against a target virtual machine – vCenter then indicated that another task was in progress but when we look in the web interface to see running tasks nothing shows. This can be a common occurrence especially with long running tasks or where somebody reboots a vCenter.

To see what is happening we will connect via SSH to the host running the virtual machine and then leverage the vim-cmd commands to determine what is happening and how far the task has progressed.

The first command we will run is vim-cmd vmsvc/getallvms which will return a list of the running virtual machines on this host. This will allow us to identify the virtual machine ID which is required by our subsequent commands.

In the above example our virtual machine ID is 122 – we can now feed this into our next command, vim-cmd vmsvc/get.tasklist

This command takes the VMID we determined previously and displays a list of all the tasks, as we see below there is already a snapshot removal task running.

Now we know what the running task is it would be useful to understand how far it has progressed and what our completion percentage is. We leverage vim-cmd vimsvc/task_info command which takes the task information from our previous command. We need to take the value for vim.Task: which in our case is haTask-122-vim.VirtualMachine.removeAllSnapshots-869472401

We get quite a bit of information returned but for me the most useful part is the progress value which in this case shows the task is 93% complete. We can run the command multiple times through the day to see how the task is doing and when it has completed.

Hopefully this information proves useful to you and helps identify those ‘hidden’ tasks which the web management interface may no longer display but which are still active.

1 thought on “VMware vCenter – Another Task Is Already In Progress”

Leave a Reply

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