«

»

Sep 28

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.

About the author

vHersey

Hersey Cartwright is an IT professional with extensive experience designing, implementing, managing, and supporting technologies that improve business processes. Hersey is Solutions Architect for SimpliVity covering Virginia, Washington DC, and Maryland. He holds the VMware Certified Design Expert (VCDX-DV #128) certification. Hersey actively participates in the VMware community and was awarded the VMware vExpert title in 2016, 2015, 2014, 2013, and 2012. He enjoys working with, teaching, and writing about virtualization and other data center technologies. Follow Hersey on Twitter @herseyc

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

six + nineteen =