DCAVMware

Creating a Scheduled Tasks to Change VM Resource Settings

Let’s say there is a VM, or a Resource Pool with several VMs, that most of the time just sits idle. Every Sunday an application runs on this VM (or on VMs in the Resource Pool) to do some data analysis and generates reports, the process usually takes 2-4 hours. During this this time you want to be able to reserve some CPU and/or memory resources so the VM (or Pool) can complete the process and then you want to be able to return the resources to the environment.

This can be easily automated by creating Scheduled Tasks to add and remove VM resources.

Just open Scheduled Tasks pane from the vSphere Client Home screen and click the icon to add a new tasks.

Select “Change resource pool or VM resource settings” from the Select a task to schedule drop down.

On the Select Entity choose the VM or Resource Pool were the resources need to be modified.

CPU and memory Shares can be changed, a CPU and memory reservation can be set, and a CPU and memory limit can be set.

Create a task name, description and set the schedule. For this example the task needs to execute once a week on Sunday morning at 1:00 AM. To accomplish this the frequency is set to weekly, the time is set to 1:00 AM, and then day of week is set to Sunday.

Select whether or not to be notified when the task completes and enter a notification email address. Multiple email addresses can be entered by separating them with semicolons (;).

Review the summary and select Finish to add the scheduled task.

Repeat the process to create another schedule task that runs 4 hours later to remove the resource reservations from the VM (or Pool).

More on creating Scheduled Tasks can be found in the vSphere 4.1 Datacenter Administration Guide.

Leave a Reply

Your email address will not be published. Required fields are marked *

8 + sixteen =