VMware Cloud Community
mctigue
Contributor
Contributor

Virtual machine caught in migration state

I have a virtual machine that I attempted to migrate to another datastore using svmotion from the command prompt. However, due to space issues on the original datastore, the migration failed to complete. Now my virtual machine fails to start and the only option I have when I right click on the vm from within the VI client is to "Complete Migration...". All other options such as "Power On", "Power Off", "Delete from Disk", etc are all grayed out. At this point I no longer care to complete the migration. I have a new system running so I now need to delete this virtual machine. How can I complete this when all my options are grayed out? Is there a command in the ESX console I can use? Any suggestions would be greatly appreciated.

Thanks,

S.

Tags (4)
0 Kudos
3 Replies
athlon_crazy
Virtuoso
Virtuoso

Hmmm you could try to kill the running VM or stop it if necessary.

1) Check any task running in the background

  • $vimsh

  • $vimsvc/task_list

(ManagedObjectReference) [

'vim.Task:haTask-384-vim.VirtualMachine.createSnapshot-2487'

]

2) Cancel the task if possible with

  • $vimsvc/task_cancel ID

3) Check your running VM PID & try to stop or kill it if necessary.

  • $ps auxfww | grep vm-name

  • $kill -INT pid

System Engineer

Zen Systems Sdn Bhd

Malaysia

www.no-x.org

http://www.no-x.org
lamw
Community Manager
Community Manager

Here is a nice blog post by Mr. Duncan: http://www.yellow-bricks.com/2009/04/15/the-basics-how-to-kill-a-vm-thats-stuck-during-shutdown/

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

mctigue
Contributor
Contributor

Both posts were helpful with troubleshooting and ultimately being able to identify what processes were hanging.

0 Kudos