Loading

×Sorry to interrupt
CSS Error

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

Collecting information about tasks in VMware ESXi/ESX (1013003)

Last Updated: 3/22/2024Categories: How toTotal Views: 212419Language:
English

13 like this article

Subscribe to get an email
newsletter with new updates

13 people found this helpful Please provide article feedback:

Learn how VMware Skyline Advisor and Skyline Health Diagnostics work together to provide proactive intelligence and self-service log analysis.

Use Skyline Advisor to avoid issues before they occur across VCF, vSphere, vSAN, NSX, vROps & Horizon. Skyline Findings are based on top KBs, VMSAs/CVEs and design best practices.

Use Skyline Health Diagnostics to root cause vSphere & vSAN logs when an issue occurs. Skyline Health Diagnostic Findings are based on top KBs and VMSA/CVEs. You can use the Skyline Health Diagnostics tool in online or offline mode.

If you require additional help from technical support, please use Skyline Advisor to initiate a Log Assist to reduce time to upload logs. TSEs can also initiate logs to reduce effort.

Symptoms

When there are troubleshooting issues with ESXi/ESX hosts and VMware vCenter Server, there may be differences between what vCenter Server and an ESXi/ESX host considers tasks.

An issue may occur when a task within vCenter Server times out. And when attempting to run other tasks, you see the error:

Another task is already in progress.

Purpose

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

Resolution

Note: For more information on resolving the symptoms described above, see Restarting the Management agents on an ESXi or ESX host (1003490). If your problem is re-occurring, and you must determine which task the ESXi/ESX host is taking a long time to process.

To isolate the task, follow these steps for the appropriate host:

ESX hosts

To collect information about tasks for ESX hosts:

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).

To get a list of tasks on the 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'
]

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

Make note of the values under the Vmid column as they are referenced in later steps.

When you have the Vmid, you can then get a list of tasks associated with a specific virtual machine. Run the command:

vim-cmd vmsvc/get.tasklist VMID

Where VMIDis the number identified in step 4.

The output is similar to:

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

Make note of the task identifier. In the example above, the task identifier is:

haTask-112-vim.VirtualMachine.createSnapshot-3887

To get information about the status of a particular task, run the command:

vim-cmd vimsvc/task_info task_identifier

Where task_identifier is the string recorded in step 6.

The output is similar to:

(vim.TaskInfo) {
dynamicType = <unset>,
key = "haTask-112-vim.VirtualMachine.createSnapshot-3887",
task = 'vim.Task:haTask-112-vim.VirtualMachine.createSnapshot-3887',
description = (vmodl.LocalizableMessage) null,
name = "vim.VirtualMachine.createSnapshot",
descriptionId = "VirtualMachine.createSnapshot",
entity = 'vim.VirtualMachine:112',
entityName = "deploy-test",
state = "running",
cancelled = false,
cancelable = false,
error = (vmodl.MethodFault) null,
result = <unset>,
progress = 15,
reason = (vim.TaskReasonUser) {
dynamicType = <unset>,
userName = "root",
},
queueTime = "2012-11-28T01:29:35.233835Z",
startTime = "2012-11-28T01:29:35.234891Z",
completeTime = <unset>,
eventChainId = 2936866,
changeTag = <unset>,
parentTaskKey = <unset>,
rootTaskKey = <unset>,
}

ESXi hosts

To collect information about tasks for ESXi hosts:

Log into the ESXi host at the console. For more information, see Tech Support Mode for Emergency Support (1003677).

To get a list of tasks on the 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'
]

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

Make note of the values under the Vmid column as they are referenced in later steps.

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'
]

Make note of the task identifier. In the example above, the task identifier is:

haTask-112-vim.VirtualMachine.createSnapshot-3887

To get information about the status of a particular task, run the command:

vim-cmd vimsvc/task_info task_identifier

Where task_identifier is the string recorded in step 6.

The output is similar to:

(vim.TaskInfo) {
dynamicType = <unset>,
key = "haTask-112-vim.VirtualMachine.createSnapshot-3887",
task = 'vim.Task:haTask-112-vim.VirtualMachine.createSnapshot-3887',
description = (vmodl.LocalizableMessage) null,
name = "vim.VirtualMachine.createSnapshot",
descriptionId = "VirtualMachine.createSnapshot",
entity = 'vim.VirtualMachine:112',
entityName = "deploy-test",
state = "running",
cancelled = false,
cancelable = false,
error = (vmodl.MethodFault) null,
result = <unset>,
progress = 15,
reason = (vim.TaskReasonUser) {
dynamicType = <unset>,
userName = "root",
},
queueTime = "2012-11-28T01:29:35.233835Z",
startTime = "2012-11-28T01:29:35.234891Z",
completeTime = <unset>,
eventChainId = 2936866,
changeTag = <unset>,
parentTaskKey = <unset>,
rootTaskKey = <unset>,
}

Related Information

Restarting the Management agents in ESXi
Tech Support Mode for Emergency Support
Unable to connect to an ESX host using Secure Shell (SSH)
vCenter operation times out with the error: Operation failed since another task is in progress
Como coletar informações sobre as tarefas no ESX e no ESXi da VMware
Recopilar información de tareas en VMware ESX y ESXi
收集有关 VMware ESXi/ESX 中任务的信息
VMware ESXi/ESX のタスクに関する情報を収集する
Troubleshooting virtual machine power on task hangs

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

Result 1 of 1

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere ESXi

VMware ESX Server

Related Versions:

VMware vSphere ESXi 7.0.0

VMware vSphere ESXi 6.7

VMware vSphere ESXi 6.5

VMware vSphere ESXi 6.0

VMware vSphere ESXi 5.5

VMware vSphere ESXi 5.1

VMware vSphere ESXi 5.0

VMware ESXi 4.1.x Installable

VMware ESXi 4.0.x Installable

VMware ESXi 4.0.x Embedded

VMware ESXi 3.5.x Installable

VMware ESXi 3.5.x Embedded

VMware ESX Server 3.5.x

VMware ESX Server 3.0.x

VMware ESX 4.1.x

VMware ESX 4.0.x

view all

Take Our Survey

Support Assistant