VMware vSphere

 View Only
Expand all | Collapse all

How do I kill a hung task?

  • 1.  How do I kill a hung task?

    Posted May 07, 2007 07:14 PM

    I have looked through these forums for this and so far have been unsuccessful in my search, so I will ask...please forgive if this is a dupe question....

    I have copied over a template from another ESX 3 vm farm and deployed a Virtual Machine from the template. When I powered on the VM, the "Power On Virtual Machine" task is hung at "In Progress". I cannot cancel the task. Is there a way to KILL the process without rebooting the ESX server?

    Virtual Infrastructure Client

    Version 2.0.1

    Build 32042

    Virtual Infrastructure Server

    Version 2.0.1

    Build 40644

    VMWare ESX Server 3.0.1, 32039



  • 2.  RE: How do I kill a hung task?

    Posted May 07, 2007 07:22 PM

    You can run service mgmt-vmware restart on the ESX host to restart the VC agent.



  • 3.  RE: How do I kill a hung task?

    Posted May 07, 2007 08:28 PM

    Thanks! I tried the first response and it did not clear out the task (good try though! :smileygrin:). I will try the second response and provide feedback when I am done.

    Message was edited by:

    fortec



  • 4.  RE: How do I kill a hung task?

    Posted May 07, 2007 08:30 PM

    Is the task truly hung or is VC just saying it is In Progress? If the VM is powered on OK the task will timeout after 15 minutes in VC. You can also try doing "service vmware-vpxa restart"



  • 5.  RE: How do I kill a hung task?

    Posted May 07, 2007 09:15 PM

    I have tried restarting mgmt-vmware and vmware-vpxa services and the "Power On Virtual Machine" task will not go away.



  • 6.  RE: How do I kill a hung task?

    Posted May 07, 2007 09:31 PM

    If your priority is to start the VM then start the VI client and connect directly to the host.

    For VC, close your current VI Client and reconnect? If it still shows as pending, close the VI client, restart the VirtualCenter service and try again.



  • 7.  RE: How do I kill a hung task?

    Posted May 07, 2007 07:49 PM

    Is the VM itself is hung up you can do this...

    How can I kill a stuck virtual machine?

    ESX 3.0 method

    o Login to the service console

    o You can check the VM state by typing “vmware-cmd /” Note - In rare conditions, doing a kill -9 on a VM can take down the entire host



  • 8.  RE: How do I kill a hung task?

    Posted May 07, 2007 09:10 PM

    The VM state is still off so there is no process to kill. The "Power On Virtual Machine" task is still "In Progress". Is there a way to just kill the task?



  • 9.  RE: How do I kill a hung task?

    Posted May 08, 2007 05:47 AM

    Have you tried restarting the VMware VirtualCenter Server[/b] service on your Windows server?

    We had a similar problem and this seemed to clear the queue. Let us know.

    Kind regards,

    Glen



  • 10.  RE: How do I kill a hung task?

    Posted May 08, 2007 03:12 PM

    Restarting the Virtual Center Service on the VC server worked. Makes sense now that I think about it - the VM was NOT running (as shown by vmware-cmd //server.vmx getstate) so the power on task never got that far, meaning it was hung at the virtual center level.

    Once I was able to stop the task, I verified that all the vm settings (like where the CD was mapped to) was not pointing to some image not on the new server and the VM started successfully.

    Thanks to everyone who replied!



  • 11.  RE: How do I kill a hung task?

    Posted Nov 12, 2007 03:41 PM

    Wonderful suggestion, thank you very much. I've always had a problem with swap and disk files still being locked afterwards, but the vm-support suggestion avoided this.

    FYI, for those finding this, the odd square boxes are dashes. The sequence is:

    vm-support -x

    vm-support -X

    first 'x' is lowercase, second is uppercase.



  • 12.  RE: How do I kill a hung task?

    Posted Oct 16, 2007 08:39 PM

    I had the same problem. A virtual machine guest was powered down but the Virtual Center still showed the powering off virtual machine as "in progress". After several minutes this became apparent that this was "stuck".

    Logging into the virtual center server and then stopping and restarting the VMware VirtualCenter Server service cleared the stuck "in progress" message.

    We are running virtual center 2.0.1 build 40644 with the 2.0.1 build 35568 VIC.

    Gene