Creating a custom attribute with a number of shares per VM on each resource pool
Creating your base script to set the number of shares per resource pool is the first step to fully automating a process to update your share values in order to keep up with the changes and movements in the vSphere environment. Many vSphere environments can have multiple clusters and many more resource pools than just a Development
, Test
, and Production
pool. For example, your environment can have a pool for mission critical systems and one for database systems.
If you have a complex environment, one method to automate the share value assignment is to define a number of shares per VM on each resource pool. This will allow you to take the predefined number of shares and do the computations from the previous recipe in a more automated way. This recipe will walk you through the process of creating a custom attribute and assigning a value to that attribute on each of the resource pools.
In this example, you will use...