Create a job to schedule an action to be performed automatically. You can select the type of action you want to perform, and then select the scope of the action. You can filter the scope based on attributes and metrics. Every action has a configuration option, which enables you to control the execution of the job based on conditions.
Procedure
- In the Automation Central page, click Add Job.
The Create New Job page opens. This page displays a wizard with steps you must complete to create an automation job.
- In the Select Action step of the wizard, specify the following properties to create the action:
Property Description Name Specify a name for the job. This is displayed in the calendar. Description Provide a description for the job. Optimization Actions Select this option for scheduling VM optimization actions. The choices are: Reclaim:- Delete old snapshots. When you select this option, you must specify the snapshot age in days.
- Delete idle VMs. When you select this option, you must specify the idle time duration in days.
- Power off idle VMs. When you select this option, you must specify the idle time duration in days.
- Delete powered off VMs. When you select this option, you must specify the power off duration in days.
Note: The time definition for powered off VMs, idle VMs, and snapshots is configured Optimize > Reclaim > page. Click the Settings link on the page to edit or view the reclamation settings. Ensure that you have reviewed the settings in the Reclaimation page before configuring the job here.Rightsize:- Downsize oversized VMs. When you select this option, you must select the rightsize resource type, and the downsizing limit amount.
- Scale-up undersized VMs. When you select this option, you must select the rightsize resource type.
Note: vRealize Operations does not check if the VM hot add/remove setting is enabled. If the VM power off is not allowed, then the action will fail. You will find the error in Recent tasks and in the logs.Additional Actions Select this option for scheduling additional actions such as powering on, powering off, and rebooting VMs and instances. - Adapter Type: Select a public cloud or vCenter adapter from the drop-down list. Options are, vCenter, GCP, AWS, Microsoft Azure.
- Object Type: Select the object from the drop-down list on which you want the action to be performed. Options are, Virtual Machine, Host System, Cluster Compute Resource.
- Action: Start typing the name of the action, or select an action from the drop-down list. The options are as follows:
Adapter Type Available Action vCenter - Power Off VM
- Power On VM
- Reboot Guest OS For VM
GCS - Power Off CE Instance
- Power On CE Instance
- Reboot CE Instance
AWS - Power EC2 Instance
- Power On EC2 Instance
- Reboot EC2 Instance
Microsoft Azure - Power Off Azure Virtual Machine
- Power On Azure Virtual Machine
- Reboot Azure Virtual Machine
- After you have dragged & dropped the objects for the action, click Preview at the bottom right corner to see on which objects the jobs will potentially be executed. This list may be different after you apply some filter from the Filter Criteria page.
Note: The final objects list on which the actions will be run can be seen by clicking the Preview button for the relevant job in the Schedule tab.
- Click Next.
- In the Select Scope step of the wizard, select scope of the object which contains the VMs on which vRealize Operations must run the automation jobs.
Note:
- When you select scope for Additional Actions, the objects that you drag and drop must be either of the same object type, or the ancestor object (that will serve as a container) of the object type you have selected in the previous step. For example, if you selected Host System in the previous step, you need to select either a Host System object or an object that is higher in hierarchy (Cluster Compute Resources, Datacenter etc).
- vRealize Operations ignores object types which do not match the object type that you selected in the previous step. Invalid object types can be object of descendant object types, objects from a different management pack/solution, or from unrelated object hierarchy.
- Drag and drop the object type to the left pane.
- To delete members, click the X icon.
- Click Next.
- In the Filter Criteria step of the wizard, you can create rules using which vRealize Operations filters objects on which the jobs are run. If you do not create a rule, all the VMs within the scope of the selected object type are affected.
- In the Set Filter Criteria section, create rules using a combination of metrics, relationship, property, object name or tag values and logical expressions.
- YYou can add more than one criteria by clicking either the ADD ANOTHER CRITERIA SET or ADD buttons. When you click ADD ANOTHER CRITERIA SET, vRealize Operations creates an OR logical expression between the criteria sets. When you click ADD button, vRealize Operations creates an AND logical expression between the criteria.
- Click Next.
- In the Schedule step of the wizard, configure a schedule for the action to run.
Property Description Start Date Set a start date which is on, or after the current date, for the job to start. Select a date from the calendar displayed on the page. Note: There will be a delay of up to five minutes for a job to run. The actual start time for an action also depends on the action itself and the number of target objects involved.Time zone For the start time and date to be calculated for the job, select a time zone. Choices are: - Browser - based on the current location reported by the browser.
- Host - based on the current location of the host machine.
- GMT based time zone - Based on a location calculated as per UTC+0.
Start Time Select a start time for the job. The drop-down menu provides options in five minute intervals, starting closest to your current browser reported time. Recurrence Set a recurrence for the job. The choices are: - One-Time. No further configuration is possible.
- Daily. Set the recurrence in days. Set how frequently it must run by providing a value in Run Every field.
- Weekly. Select the days of the week when you want the job to run, by clicking the day of the week abbreviation.
- Monthly. Select the months when you want the job to run, by clicking the month abbreviation. By default, all the months are selected. For the months that you select, you can configure the job to run:
- On specific days of the month, by clicking the number. Or, the last day of the month, without specifying the exact date, by clicking Last.
- On the specific number of the week (first, second, third, fourth or the last) in the month, combined with the specific day of the week.
For the Daily, Weekly, Monthly options, you can set when the job must end based on a date, or the number of occurrences.
- In the Notifications section, select the Receive Updates on Job via Email check box to receive notifications two hours before the job is set to run and after it has been executed. For the email to be sent, you must also select the email outbound plugin from the drop down menu, and enter the email address to which the email must be sent. If you have not created an email outbound plugin, see the topic, Outbound Settings in the Configuring guide.
Note: You can send updates via email to only one email ID.
- Click Create to complete the steps in the wizard and create the job.