Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Collecting information about tasks in VMware ESX and ESXi

Symptoms

While troubleshooting issues with VMware ESX and VMware vCenter, there may be differences between what vCenter and ESX consider tasks. An issue may occur when a task within vCenter server times out, and when attempting to run other tasks, it reports the error:
 
Another task is already in progress.

Purpose

This article provides steps to collect information about tasks for ESX and ESXi hosts.

Resolution

Note: For more information on resolving the symptoms described above, see Restarting the Management agents on an ESX or ESXi Server (1003490).
If your problem is re-occuring, and you need to find out which task the ESX host is taking a long time to process, you can use the following steps to isolate the task.

ESX

To collect information about tasks for ESX hosts:

  1. Log into the ESX host at the console or via SSH.  For more information, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807).
  2. In order to get a list of tasks on this host, run the command:

    vmware-vim-cmd vimsvc/task_list

    The output is similar to:

    (ManagedObjectReference) [
       'vim.Task:haTask-112-vim.VirtualMachine.createSnapshot-3887',
       'vim.Task:haTask-pool21-vim.ResourcePool.updateConfig-33252',
       'vim.Task:haTask-pool22-vim.ResourcePool.updateConfig-33253',
       'vim.Task:haTask-pool3-vim.ResourcePool.updateConfig-33254',
       'vim.Task:haTask-pool5-vim.ResourcePool.updateConfig-33255',
       'vim.Task:haTask-pool6-vim.ResourcePool.updateConfig-33256',
       'vim.Task:haTask-pool7-vim.ResourcePool.updateConfig-33257',
       'vim.Task:haTask-pool8-vim.ResourcePool.updateConfig-33258',
       'vim.Task:haTask-pool10-vim.ResourcePool.updateConfig-33260'
    ]

  3. To get a list of tasks associated to specific virtual machines, you must first get the Vmid of the virtual machine. Run the command:

    vmware-vim-cmd vmsvc/getallvms

    The output is similar to:

    Vmid        Name                  File                       Guest OS       Version   Annotation
    112    VM-1           [Datastore] VM-3/VM-3.vmx      winLonghornGuest        vmx-04
    128    VM-2           [Datastore] VM-3/VM-3.vmx      winXPProGuest           vmx-04
    144    VM-3           [Datastore] VM-3/VM-3.vmx      winNetStandardGuest     vmx-04

  4. Make note of the values under the Vmid column as they will be referenced in later steps.
  5. When you have the Vmid, you can then get a list of tasks associated with a specific virtual machine. Run the command:

    vmware-vim-cmd vmsvc/get.tasklist <VMID>

    where <VMID> is the number identified in step 4. 

    The output is similar to:

    (ManagedObjectReference) [
       'vim.Task:haTask-112-vim.VirtualMachine.createSnapshot-3887'
    ]

  6. Make note of the task identifier. In the above example, the task identifier is 3887.
  7. To get information about a particular task's status, run the command:

    vmware-vim-cmd vimsvc/task_info <task identifier>

    where <task identifier> is the number recorded in step 6.
     

    The output is similar to:

    (vmodl.fault.ManagedObjectNotFound) {
       dynamicType = <unset>,
       faultCause = (vmodl.MethodFault) null,
       obj = 'vim.Task:3887',
       msg = "The object has already been deleted or has not been completely created",
    }

ESXi

To collect information about tasks for ESX hosts:

  1. Log into the ESXi host at the console. For more information, see Tech Support Mode for Emergency Support (1003677).
  2. In order to get a list of tasks on this host, run the command:

    vim-cmd vimsvc/task_list

    The output is similar to

    (ManagedObjectReference) [
       'vim.Task:haTask-112-vim.VirtualMachine.createSnapshot-3887',
       'vim.Task:haTask-pool21-vim.ResourcePool.updateConfig-33252',
       'vim.Task:haTask-pool22-vim.ResourcePool.updateConfig-33253',
       'vim.Task:haTask-pool3-vim.ResourcePool.updateConfig-33254',
       'vim.Task:haTask-pool5-vim.ResourcePool.updateConfig-33255',
       'vim.Task:haTask-pool6-vim.ResourcePool.updateConfig-33256',
       'vim.Task:haTask-pool7-vim.ResourcePool.updateConfig-33257',
       'vim.Task:haTask-pool8-vim.ResourcePool.updateConfig-33258',
       'vim.Task:haTask-pool10-vim.ResourcePool.updateConfig-33260'
    ]

  3. To get a list of tasks associated to specific virtual machines, you must first get the Vmid of the virtual machine. Run the command:

    vim-cmd vmsvc/getallvms

    The output is similar to:

    Vmid        Name                  File                       Guest OS       Version   Annotation
    112    VM-1           [Datastore] VM-3/VM-3.vmx      winLonghornGuest        vmx-04
    128    VM-2           [Datastore] VM-3/VM-3.vmx      winXPProGuest           vmx-04
    144    VM-3           [Datastore] VM-3/VM-3.vmx      winNetStandardGuest     vmx-04

  4. Make note of the values under the Vmid column as they will be referenced in later steps.
  5. When you have the Vmid, you can then get a list of tasks associated with a specific virtual machine by running the command:

    vim-cmd vmsvc/get.tasklist <VMID>

    where <VMID> is the number identified in step 4.

    The output is similar to:

    (ManagedObjectReference) [
       'vim.Task:haTask-112-vim.VirtualMachine.createSnapshot-3887'
    ]

  6. Make note of the task identifier. In the above example, the task identifier is 3887.
  7. To get information about a particular task's status, run the command:

    vim-cmd vimsvc/task_info <task identifier>

    where <task identifier> is the number recorded in step 6.
     

    The output is similar to:

    (vmodl.fault.ManagedObjectNotFound) {
       dynamicType = <unset>,
       faultCause = (vmodl.MethodFault) null,
       obj = 'vim.Task:3887',
       msg = "The object has already been deleted or has not been completely created",
    }

See Also

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback


Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
Actions