Determining which user account initiated a task in vCenter Server 4.x

Purpose

This article provides steps to determine which user account initiated a task in vCenter Server 4.x.

Resolution

In some cases, you may need to determine who initiated tasks such as creating/deleting a virtual machine, powering on/off a virtual machine, creating/deleting a snapshot.

Open a vSphere Client to vCenter Server, select the Hosts and Clusters View, and look under the Tasks and Events tab to see if the task and the identity of the user who initiated the task can be identified.

If the user information is not available, you can attempt to retrieve this information directly from the vCenter Server database. All tasks are stored in table VPX_TASK in the vCenter Server database, and the data available is dependent on the Database Retention Policy. By default, Database Retention Policy is turned off and the retention policy is to keep tasks and event indefinitely. To access the Database Retention Policy setting in the vSphere Client, select Administration > vCenter Server Settings > Database Retention Policy.

To determine which user initiated a task
  1. Log in to SQL Server Management Studio.
  2. Click New Query.
  3. From the database dropdown, select the vCenter Server database.
  4. Run this query in the SQL Query window:

    select task_id, parent_task_id, start_time, username, complete_time, entity_name, descriptionid, complete_state
    from VPX_TASK


  5. Click Execute to run the query.

    From the output, determine the task_id of the task in question. If there is no associated username with the task, find theparent_task_id and determine the user that initiated that task. For example:

Note: For more information about the descriptionid column, see the Additional Information section.

In this example output, task_id 212 shows a recorded event for virtual machine VM4 powering on. However, there is no associated username. In this case, you need to look at the  parent_task_id, which is 211. task_id 211 shows that the task was performed by KNOWLEDGE\brandon. In most cases, the task and the user who initiated the task is shown.

Based on VMware KB  2009075
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Hardware and firmware requirements for 64-bit guest operating systems

PurposeThis article explains the host machine hardware and firmware requirements for installing...

Logging in to the vCenter Server 5.0 Web Client fails with the error: unable to connect to vCenter Inventory Service

DetailsAfter upgrading from vCenter Server 4.1 to 5.0, you experience these symptoms:Cannot log...

Multiple network entries in vCenter Server 5.0.x after migrating virtual machines from a virtual switch to a virtual distributed switch

SymptomsAfter migrating virtual machines from a virtual switch to a virtual Distributed...

Minimum requirements for the VMware vCenter Server 5.x Appliance

PurposeIf you are using the VMware vCenter Server Appliance, beginning with vSphere 5.0 you can...