vSphere tasks are activities and actions that occur on an object within the vSphere inventory.
vSphere tasks represent system activities that do not complete immediately, such as migrating a virtual machine. For example, powering off a virtual machine is a task. You can perform this task manually every evening, or you can set up a scheduled task to power off the virtual machine every evening.
How Do You View vSphere Tasks
Learn how to view vSphere tasks that are associated with a single object or all objects in a vSphere environment.
By default, the task list for an object also includes tasks performed on its child objects. You can filter the task list by entering the object that you want in the Target column filter.
If you are logged in to a vCenter Server instance that is part of a vCenter Enhanced Linked Mode group, the Server column in the task list displays the name of the vCenter Server system on which the task is performed.
Procedure
How Do You Cancel a vSphere Task
Canceling a vSphere task stops a running task from occurring. Canceling a scheduled task does not cancel subsequent runs. To cancel a scheduled task that has not run, reschedule it.
Prerequisites
Required privileges:
- Manual tasks:
- Scheduled tasks:
Procedure
Results
Cancelled tasks and the corresponding events are retained in the vCenter Server database. For information about the retention of tasks and events in the vCenter Server database, and how to configure the database settings, see the vSphere Monitoring and Performance documentation.
How Do You Filter vSphere Tasks
To lower the number of vSphere tasks displayed for a single object or all objects in your environment, filter the task history in the database using several criteria, such as status, initiator, and time range.
Procedure
Results
The Tasks page displays the tasks that match your criteria. If you want to clear the task filter, click Clear all filters in the upper-right corner.
How Do You Export vSphere Tasks
You can export the detailed information for selected vSphere tasks or all tasks listed in the Tasks page to a CSV file.
To export the information about specific tasks, you can filter the task list and then select only the tasks that you want. You can also export the information about all tasks listed for an object or all objects in the vSphere environment.
Procedure
How Do You Export vSphere Tasks with Advanced Export
You can use the advanced export option to export vSphere tasks that meet your specific criteria, such as status, initiator, and time range.
With the advanced export option for tasks, you can export up to 100 tasks that meet your specific criteria. You can use the exported information for monitoring and troubleshooting purposes. For example, you can export the tasks performed by specific users during the time range when some suspicious activity was detected.
Procedure
Results
A .csv file is generated and available for download.
Scheduling vSphere Tasks
You can schedule vSphere tasks to run once in the future or multiple times, at a recurring interval.
The vSphere tasks that you can schedule are listed in the following table.
Scheduled Task | Description |
---|---|
Add a host | Adds the host to the specified data center or cluster. |
Change the power state of a virtual machine | Powers on, powers off, suspends, or resets the state of the virtual machine. |
Change cluster power settings | Activate or deactivate DPM for hosts in a cluster. |
Change resource settings of a resource pool or virtual machine | Changes the following resource settings:
|
Check compliance of a profile | Checks that a host's configuration matches the configuration specified in a host profile. |
Clone a virtual machine | Makes a clone of the virtual machine and places it on the specified host or cluster. |
Create a virtual machine | Creates a new virtual machine on the specified host. |
Deploy a virtual machine | Creates a new virtual machine from a template on the specified host or cluster. |
Migrate a virtual machine | Migrate a virtual machine to the specified host or datastore by using migration or migration with vMotion. |
Make a snapshot of a virtual machine | Captures the entire state of the virtual machine at the time the snapshot is taken. |
Scan for Updates | Scans templates, virtual machines, and hosts for available updates. This task is available only when vSphere Lifecycle Manager is installed. |
Remediate | Installs missing patches from the baselines selected for remediation on the hosts discovered during the scan operation and applies the newly configured settings. This task is available only when vSphere Lifecycle Manager is installed. |
You create scheduled tasks by using the Scheduled Task wizard. For some scheduled tasks, this wizard opens the wizard used specifically for that task. For example, if you create a scheduled task that migrates a virtual machine, the Scheduled Task wizard opens the Migrate Virtual Machine wizard, which you use to set up the migration details.
Scheduling one task to run on multiple objects is not possible. For example, you cannot create one scheduled task on a host that powers on all virtual machines on that host. You must create a separate scheduled task for each virtual machine.
After a scheduled task runs, you can reschedule it to run again at another time.
How Do You Create a Scheduled vSphere Task
You can create scheduled tasks for operations that you want to run automatically once or at a recurring interval.
If the task to schedule is not available in the vSphere Client, use the vSphere API. See the vSphere SDK Programming Guide.
Prerequisites
Required privilege:
Procedure
How Do You Change or Reschedule a Scheduled vSphere Task
After a scheduled vSphere task is created, you can change the schedule, frequency, and other attributes of the task. You can edit and reschedule tasks before or after they run.
Prerequisites
Required privilege:
Procedure
How Do You Remove a Scheduled vSphere Task
Removing a scheduled task removes all future occurrences of the task. The history associated with all completed occurrences of the task remains in the vCenter Server database.
Prerequisites
Required privilege: