VMware Cloud Community
jamcguire123
Contributor
Contributor

Unable to power off VM

Hi,

I have a VM which is refusing to power off, with error "another task is in progress"

I have tried:

> esxcli vm process list

Z-VRA-svr-vmhost-05.gb.vo.local

   World ID: 12930751

   Process ID: 0

   VMX Cartel ID: 12930750

   UUID: 42 28 d6 b5 ba e8 82 86-89 48 00 5a f4 4c 98 a1

   Display Name: Z-VRA-svr-vmhost-05.gb.vo.local

   Config File: /vmfs/volumes/4cd16e5c-fa5e9173-4bbe-001b2171bc00/Z-VRA-svr-vmhost-05.gb.vo.local/Z-VRA-svr-vmhost-05.gb.vo.local.vmx


> esxcli vm process kill –type=force –world-id=12930751

But the VM is still present on the next run of process list.

I then tried to kil it with ps:

> ps |grep Z-VRA

12930751  vmm0:Z-VRA-svr-vmhost-05.gb.vo.local

12930760 12930750 vmx-vcpu-0:Z-VRA-svr-vmhost-05.gb.vo.local /bin/vmx

> kill -9 12930750

sh: can't kill pid 12930750: No such process

> kill -9 12930760

sh: can't kill pid 12930760: No such process

> kill -9 12930751

sh: can't kill pid 12930751: No such process

Finally I followed VMware KB: Collecting information about tasks in VMware ESXi/ESX

/vmfs/volumes # vim-cmd vmsvc/getallvms

Vmid                Name                                                             File                                                     Guest OS          Version   Annotation

53     Z-VRA-svr-vmhost-05.gb.vo.local   [VMFS-500GB-Production6] Z-VRA-svr-vmhost-05.gb.vo.local/Z-VRA-svr-vmhost-05.gb.vo.local.vmx   ubuntuGuest             vmx-10

And this showed me that there is a stuck task associated:

/vmfs/volumes # vim-cmd vmsvc/get.tasklist 53

(ManagedObjectReference) [

   'vim.Task:haTask-53-vim.VirtualMachine.reset-354981370'

]

So now what, how do I kill the process associated with that task?  There must be a way other than rebooting the host.

0 Kudos
3 Replies
SavkoorSuhas
Expert
Expert

Hello

I see that you have tried killing the process without luck.

Not quite sure, if you have referred this KB

VMware KB: Powering off a virtual machine on an ESXi host

Do check it and let me know

Suhas

If you found this or any other answer useful please consider the use of the Helpful or Correct buttons to award points.

Don't Backup. Go Forward!
Rubrik

0 Kudos
jamcguire123
Contributor
Contributor

Yes I have exhausted the possibilities from that KB as you can see from my comments above.

0 Kudos