VMware Cloud Community
syt75013
Contributor
Contributor

I cancelled a vmotion task and it is now stuck in "Cancel Requested" status

Hi everyone,

I've cancelled a Storage vMotion + vMotion task on a VM yesterday and now the task is stuck in a "Cancel Requested" status.

syt75013_0-1620389007671.png

I am now unable to manage the VM as the actions are greyed out(power off, migrate, snapshot, ect) but it's still responding.

Since the last 24 hours I am waiting for the task to timeout but it's still stuck in this state "Cancel Requested" ...

Have you guys encountered a similar issue?

Thanks !

 

0 Kudos
7 Replies
Jonathan77
Enthusiast
Enthusiast

You can try to stop the task using powerCLI..

This worked for me in the past to stop hung task...

If the task is still running... something like :

To see running tasks and find its task ID:

Get-Task -Status "Running" | select Name, Id, State

To stop the task:

(replace "task-ID" with the one located in previous command)

 Get-Task -Id "Task-ID" | Stop-Task -Confirm:$false

 Jonathan P.

0 Kudos
AveryFreeman
Enthusiast
Enthusiast

Did you ever resolve this issue?

I cancelled a simple migration from one datastore to another and it hung, leaving the source datastore in limbo. 

Now I get the same error message both in vCenter and through powercli: "The operation is not allowed in the current state." which is rather cryptic, and I don't seem to be able to get any more information than that.

I tried to list the source datastore in SSH or through the web UI and both are inaccessible.  I'm afraid I just destroyed an entire VM by simply hitting the cancel button.

0 Kudos
maksym007
Expert
Expert

Another option to kill the task directly on ESXi host via SSH. 

 

 

AveryFreeman
Enthusiast
Enthusiast

I started the task in vCenter, so I actually powered off the vCenter VM and rebooted the host (it's a new one I'm working on setting up still).

Lucky for me, the VM was in tact, it just had compute and storage resources on two separate drives.  I migrated the storage back to its original location, tested it and it was fine.

I don't recommend this as a solution, it's likely nobody else will be as lucky as I was.

esximan123
Contributor
Contributor

Me too. I powered off the vCenter VM and rebooted the host, prayed. Then when it all came back online I deleted some files that were on the host I was trying to migrate to. Then turned on the VM on the original host and by the grace of God it turned on. Will not be doing that again..

I also found that for some reason migration when the VM is turned on is way faster then if it was off. No idea why I have 10Gig but when the VM was off it transferred at 900Mb/s and when it was on it transferred at 6,500 Mb/s

0 Kudos
a_p_
Leadership
Leadership

You may or may not have noticed that you were replying to a ~2 years old discussion.

Anyway, please read https://core.vmware.com/resource/vsphere-vmotion-unified-data-transport, which explains the performance difference, and what has been changed with vSphere 8.0 to speed up storage migrations.

André

0 Kudos
syt75013
Contributor
Contributor

Hi,

If I remember correctly, I resolved the issue by restarting the vpxa and hostd service on the source ESXi

/etc/init.d/hostd stop

/etc/init.d/hostd stop

/etc/init.d/vpxa stop

/etc/init.d/vpxa start

 

0 Kudos