vSphere – “Another task is already in progress..” fix with esxcli

I recently had the ‘pleasure’ of an unresponsive vm that had basically turned into a ZOMBIE !

It could not be restarted, edited, snapshot’d and was of course, unresponsive from an OS perspective (No RDP, ping or comms just totally off the air)

Any attempted operation from the vSphere client returned “Another task is already in progress

v1

Similar results from remote PowerCLI;

v2

v3

Active tasks pane from the vSphere client;

v4

I wanted to see if anything looked unusual so logged onto the esxi host this guest was running on and tail’d the vmware.log from within the volume/folder the guest files live in.

v5

Nothing that would explain what task was allegedly still running, and nothing really sinister to point to the root cause.

Not cool, but it was clear we were going to have to get brutal and force kill it. In this case, we were fortunate that this guest was not particularly important.

The on-host esxcli tools are helpful in this type of scenario and basically allow you to use 3 levels of guest ‘kill’ types (could also be done from VMA)

1.  soft (the most graceful and first option to try)  2.  hard (immediate shutdown) 3.  force (forced shutdown, power cut)

Begin by finding the World-ID for the affected guest using the esxcli vm process list command piped through grep to filter out all except the name of the guest and the next 2 lines to include the World-id

the ‘A’ operand in grep specifies the # of lines to include after the return of the search string. You can also use ‘B’ to return lines before the result, but that’s not necessary here.

v6

So now we know the World-Id for our zombie guest is 36218516 so we’ll first attempt a soft kill using;

This fails so let’s use the bigger hammer, the hard parameter.

This fails too, so it’s time to break out the big guns, the force switch.

This works and the guest is now showing as shutdown.

v7

v8

Power it back on to verify;

v9

Looks a bit happier ! but at this point, consider running FS level check tools (chckdsk or fschk etc). Any databases etc should  also be verified for consistency also.

Unfortunately for this vm, it’s time was up and it was deleted anyway 🙁

v10

While this will not show you the root cause, it allows you to get your vm back online quickly and the RCA investigation can begin in earnest.

 

 

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: