VMware Cloud Community
gecman47
Contributor
Contributor
Jump to solution

Canceling task in webui takes very long time

The webui for ESXi seems to interpret the command to cancel a task more as a polite request rather than a command. I have yet to hit the cancellation button and the task actually cancels and it isn't for things that shouldn't be immediately canceled. For example, I started moving a large file between two drives. The VM is unregistered and powered off. I started moving it and realized I'd rather just delete it so I hit cancel task.... annnnnnd it just keeps trekking on moving those files like I did nothing.

Moving files is not something that needs additional compute before coming to a halt. Just stop doing it - immediately. It has gone 6% more on a several hundred gig transfer and shows no signs of stopping.

Question: How do you cancel a task via the webui? The cancel task button doesn't actually seem to do anything.

Update: I hit cancel task when it was at 6% (and have clicked it several times more subsequently). It is now at 25% - the task still hasn't canceled.

0 Kudos
1 Solution

Accepted Solutions
SupreetK
Commander
Commander
Jump to solution

First of all, we are not supposed to cancel certain tasks such as move, copy, SvMotion, snapshot creation/deletion, etc. due to obvious reasons. If you are moving a disk using the ESXi host client, you can cancel the task from the ESXi command line as below -

Step-1 - Identify the task ID -->

[root@esxi-1:~] vim-cmd vimsvc/task_list

(ManagedObjectReference) [

   'vim.Task:haTask--vim.VirtualDiskManager.moveVirtualDisk-15130'

*Task name for moving a file would be - haTask--vim.FileManager.moveFile-xxxxx*

Step-2 - Cancel the task -->

[root@esxi-1:~] vim-cmd vimsvc/task_cancel haTask--vim.VirtualDiskManager.moveVirtualDisk-15130

If the task does show as cancelled in the GUI after a few minutes, restart the management agents of the host to cancel all the ongoing tasks.

Please consider marking this answer as "correct" or "helpful" if you think your questions have been answered.

Cheers,

Supreet

View solution in original post

3 Replies
SupreetK
Commander
Commander
Jump to solution

First of all, we are not supposed to cancel certain tasks such as move, copy, SvMotion, snapshot creation/deletion, etc. due to obvious reasons. If you are moving a disk using the ESXi host client, you can cancel the task from the ESXi command line as below -

Step-1 - Identify the task ID -->

[root@esxi-1:~] vim-cmd vimsvc/task_list

(ManagedObjectReference) [

   'vim.Task:haTask--vim.VirtualDiskManager.moveVirtualDisk-15130'

*Task name for moving a file would be - haTask--vim.FileManager.moveFile-xxxxx*

Step-2 - Cancel the task -->

[root@esxi-1:~] vim-cmd vimsvc/task_cancel haTask--vim.VirtualDiskManager.moveVirtualDisk-15130

If the task does show as cancelled in the GUI after a few minutes, restart the management agents of the host to cancel all the ongoing tasks.

Please consider marking this answer as "correct" or "helpful" if you think your questions have been answered.

Cheers,

Supreet

gecman47
Contributor
Contributor
Jump to solution

hahaha software engineer here - maybe I'm just stupid, but no it's not obvious to me. What I'm going to take out of that is that ESXi doesn't do a copy/delete in the form of a move, I'm going to assume it's doing a byte by byte move (which is why I'm assuming you're saying it's obvious).

More just my talking out loud than a direct response:

If that's the case, as a guy who has to write frontend UI code, I have to wonder, if the task can't be canceled why is it an option then? Might as well just hide the button if it isn't going to do anything. Are all of the users of ESXi just supposed to have memorized what operations can and can't be canceled and ignore the cancel button appropriately? I wouldn't write into my frontend a button that the typical user is going to assume does something, but then on the backend secretly have it do nothing! 😛

To your point - ya, I have a lot of tasks that I'll hit cancel and then after a minute or two it will eventually say canceled. Which is actually what makes this particular situation even more annoying - am I just being impatient? Is it doing nothing? How do I tell?

0 Kudos
jmd_sqp
Contributor
Contributor
Jump to solution

This has just saved me, thanks!

0 Kudos