VMware Aria Automation | Options for CPU|Memory values
How to Allocate CPU and Memory for VMs Using T-Shirt Sizes or Custom Values
“Always deliver more than expected.” - Larry Page (Co-founder of Google)
VMware Aria Automation | VM | CPU and Memory
Recently, I was asked how to create new VMs using T-Shirt sizes and also have the flexibility to specify custom CPU and Memory values. Typically, in the YAML code of a Aria Automation Design Template, you use either the properties cpuCount
and totalMemoryMB
or the flavor
property. You cannot use both within the same template for the same VM.
After considering the options, I decided to use the cpuCount
and totalMemoryMB
properties to specify VM CPU and memory, adding logic to the YAML code to determine values based on an input named Flavor.
Flavor Options:
- Small: 1 CPU, 2 GB memory
- Medium: 2 CPUs, 4 GB memory
- Large: 4 CPUs, 8 GB memory
- Other: Use CPU and Memory values specified in custom inputs
CPU
andMemory
. See the Full Design Template YAML code below.
These two lines of YAML code demonstrate how to specify the cpuCount
and totalMemoryMB
properties. This is the key to enabling both T-Shirt sizes and custom values:
Click arrow to expand the code:
|
|
Design Templates within Aria Automation:
Design Template and YAML Code:
Small Flavor Selected:
Other Flavor Selected:
Design Template Example YAML Code:
This full Design Template YAML code shows the inputs and how to specify the cpuCount
and totalMemoryMB
properties.
Click arrow to expand the code:
|
|
Flavors:
In my lab, I already had some Flavor Mappings defined. To allow for larger sizes, I had to create a new Flavor Mapping for the maximum sizes I wanted to support. I couldn’t specify CPU or memory sizes higher than the largest existing Flavor Mapping.
Warning I received while testing:
Flavor Mappings within Aria Automation:
Flavor Mapping to allow large VM Builds:
Summary:
I hope this helps anyone looking to standardize new VM builds using T-Shirt sizes while also providing the flexibility to specify custom CPU and Memory values.
Aria Automation Version used for Blog Post:
VMware Aria Automation 8.17.0 was used for this Blog Post. When new versions of VMware Aria Automation are released, the code or process may need to be changed.
- If you found this blog article helpful and it assisted you, consider buying me a coffee to kickstart my day.