Automating share allocation balancing
In this recipe, you will take the Balancing share allocations on resource pools recipe and extend it into a fully-automated solution that maintains the balance of shares in your resource pools. This solution uses the SharesPerVM custom attribute that you created in the previous recipe to compute the number of shares needed for each resource pool. The intent is to create a fully-automated script that can be scheduled and run in order to ensure that your share settings are properly balanced for the desired allocations you want.
Getting ready
To begin this recipe, you will need a PowerCLI window and an active connection to vCenter. You will need the code you created in the Balancing share allocations on resource pools recipe, and you need to have completed the Creating a custom attribute with a number of shares per VM on each resource pool recipe.
To make this script as multipurpose as possible, you will need to extend your scope slightly. Since vCenter can...