In a previous post I covered how to configure VCF Operations 9 to use 90 days of usage data for rightsizing recommendations. That gives you a solid foundation — but once you start reviewing the recommendations, you will quickly notice that the engine does not enforce any organizational sizing standards.
For example, the engine might recommend reducing a VM from 8 vCPUs to 5, or suggest removing just 1 GB of RAM. Both are technically valid from a demand perspective, but in practice:
- Odd vCPU counts can cause NUMA alignment issues, conflict with per-socket licensing models, and break internal VM sizing templates.
- Sub-2GB memory changes create noise in your rightsizing reports without delivering meaningful capacity savings.
VCF Operations does not have native policy settings for these guardrails. But you can build them using Super Metrics — custom formulas that calculate on every collection cycle and produce metrics you can use in dashboards, views, and reports.
Before going further, I want to credit Brock Peterson’s operations_supermetrics repository on GitHub. It contains dozens of production-ready Super Metrics in the correct VCF Operations JSON import format. The rightsizing Super Metrics in this post build on his work — specifically his vCPU Recommended (oversized VMs) and Memory Recommended (oversized VMs) metrics.
Understanding the Super Metric Format
Before building anything, it helps to understand the structure. When you export a Super Metric from VCF Operations, the JSON looks like this (taken from Brock Peterson’s repo):
{"b3ac88b8-09b6-4fc3-a4b2-35e615f340c9": {
"resourceKinds": [{
"resourceKindKey": "VirtualMachine",
"adapterKindKey": "VMWARE"
}],
"modificationTime": 1694040789186,
"name": "vCPU Recommended (oversized VMs)",
"formula": "${this, metric=cpu|corecount_provisioned} - ${this, metric=summary|oversized|vcpus}",
"description": "vCPU Recommended (oversized VMs)",
"unitId": "",
"modifiedBy": "287ed085-c6ca-4255-b69c-956f1665ed51"
}}
Key fields:
- The outer key is a UUID — VCF Operations generates this on import, so you can use any valid UUID.
- resourceKinds — defines which object type the metric applies to (here:
VirtualMachinefrom theVMWAREadapter). - formula — the expression. Uses
${this, metric=...}to reference metrics on the same object. - unitId — the unit of measurement (
""for counts,"kb"for kilobytes,"gb"for gigabytes).
The key metric paths for rightsizing are:
cpu|corecount_provisioned— current allocated vCPUssummary|oversized|vcpus— recommended vCPU reduction countsummary|undersized|vcpus— recommended vCPU addition countconfig|hardware|memoryKB— current allocated memory in KBsummary|oversized|memory— recommended memory reduction in KBsummary|undersized|memory— recommended memory addition in KB
Super Metric 1: Even vCPU Recommendations (Oversized VMs)
The Problem
Brock’s original formula ${this, metric=cpu|corecount_provisioned} - ${this, metric=summary|oversized|vcpus} gives you the target vCPU count, but it can be odd. If a VM has 8 vCPUs and the engine recommends reducing by 3, the result is 5 — which does not align with standard sizing templates.
The Formula
To force even numbers, we divide by 2, truncate to an integer, and multiply back:
(${this, metric=cpu|corecount_provisioned} - ${this, metric=summary|oversized|vcpus}) / 2 * 2
How it works: VCF Operations Super Metric formulas perform integer truncation when dividing integers. If the raw target is 5, then
5 / 2 = 2(truncated), and2 * 2 = 4. If the raw target is 6, then6 / 2 = 3, and3 * 2 = 6. The result is always even, rounded down.
Downloadable JSON
📥 Download: Recommended vCPUs Even (Oversized VMs).json
{"a1c2d3e4-5f6a-7b8c-9d0e-1f2a3b4c5d6e": {
"resourceKinds": [{
"resourceKindKey": "VirtualMachine",
"adapterKindKey": "VMWARE"
}],
"modificationTime": 1711929600000,
"name": "vCPU Recommended Even (Oversized VMs)",
"formula": "(${this, metric=cpu|corecount_provisioned} - ${this, metric=summary|oversized|vcpus}) / 2 * 2",
"description": "Recommended vCPU count for oversized VMs, rounded down to the nearest even number. Based on Brock Peterson's original vCPU Recommended super metric.",
"unitId": "",
"modifiedBy": ""
}}
Super Metric 2: Even vCPU Recommendations (Undersized VMs)
The same logic applies to undersized VMs, but we add the recommended increase instead of subtracting:
(${this, metric=cpu|corecount_provisioned} + ${this, metric=summary|undersized|vcpus}) / 2 * 2
If a VM has 2 vCPUs and the engine recommends adding 3, the raw target is 5 → 5 / 2 * 2 = 4. Rounded down to the next even number.
Downloadable JSON
📥 Download: Recommended vCPUs Even (Undersized VMs).json
{"b2d3e4f5-6a7b-8c9d-0e1f-2a3b4c5d6e7f": {
"resourceKinds": [{
"resourceKindKey": "VirtualMachine",
"adapterKindKey": "VMWARE"
}],
"modificationTime": 1711929600000,
"name": "vCPU Recommended Even (Undersized VMs)",
"formula": "(${this, metric=cpu|corecount_provisioned} + ${this, metric=summary|undersized|vcpus}) / 2 * 2",
"description": "Recommended vCPU count for undersized VMs, rounded up to the nearest even number. Based on Brock Peterson's original vCPU Recommended super metric.",
"unitId": "",
"modifiedBy": ""
}}
Super Metric 3: Memory Reduction — 2 GB Minimum (Oversized VMs)
The Problem
The engine might recommend removing 512 MB or 1 GB of RAM from a VM. On a 16 GB VM, that is not worth the operational overhead of a change window. You want to filter the noise and only see reductions of 2 GB or more.
The Formula
VCF Operations Super Metrics support the ternary operator (condition ? true_value : false_value) for conditional logic. The summary|oversized|memory metric is in KB, so 2 GB = 2,097,152 KB:
${this, metric=summary|oversized|memory} >= 2097152 ? ${this, metric=config|hardware|memoryKB} - ${this, metric=summary|oversized|memory} : 0
This returns the recommended new memory value (in KB) only if the reduction is 2 GB or more. Otherwise it returns 0.
Downloadable JSON
📥 Download: Memory Recommended 2GB Min (Oversized VMs).json
{"c3e4f5a6-7b8c-9d0e-1f2a-3b4c5d6e7f8a": {
"resourceKinds": [{
"resourceKindKey": "VirtualMachine",
"adapterKindKey": "VMWARE"
}],
"modificationTime": 1711929600000,
"name": "Memory Recommended 2GB Min (Oversized VMs)",
"formula": "${this, metric=summary|oversized|memory} >= 2097152 ? ${this, metric=config|hardware|memoryKB} - ${this, metric=summary|oversized|memory} : 0",
"description": "Recommended memory for oversized VMs. Only returns a value when the recommended reduction is 2 GB (2097152 KB) or more. Returns 0 for reductions below 2 GB to reduce noise. Based on Brock Peterson's original Memory Recommended super metric.",
"unitId": "kb",
"modifiedBy": ""
}}
Super Metric 4: Memory Addition — 2 GB Minimum (Undersized VMs)
Same logic for undersized VMs — only surface memory additions of 2 GB or more:
${this, metric=summary|undersized|memory} >= 2097152 ? ${this, metric=config|hardware|memoryKB} + ${this, metric=summary|undersized|memory} : 0
Downloadable JSON
📥 Download: Memory Recommended 2GB Min (Undersized VMs).json
{"d4f5a6b7-8c9d-0e1f-2a3b-4c5d6e7f8a9b": {
"resourceKinds": [{
"resourceKindKey": "VirtualMachine",
"adapterKindKey": "VMWARE"
}],
"modificationTime": 1711929600000,
"name": "Memory Recommended 2GB Min (Undersized VMs)",
"formula": "${this, metric=summary|undersized|memory} >= 2097152 ? ${this, metric=config|hardware|memoryKB} + ${this, metric=summary|undersized|memory} : 0",
"description": "Recommended memory for undersized VMs. Only returns a value when the recommended increase is 2 GB (2097152 KB) or more. Returns 0 for increases below 2 GB to reduce noise. Based on Brock Peterson's original Memory Recommended super metric.",
"unitId": "kb",
"modifiedBy": ""
}}
How to Import
- Download the JSON files above.
- In VCF Operations, navigate to Infrastructure Operations > Configuration > Super Metrics.
- Click the ⋯ (ellipsis) menu and select Import.
- Upload the JSON file. The Super Metric will appear in your list.
- Repeat for each file.
After importing, the Super Metrics will NOT start calculating until you activate them in a policy. See the next section.
Activating in Your Policy
- Navigate to Infrastructure Operations > Configuration > Policies > Policy Definition.
- Select your production policy.
- Scroll to the Super Metrics section.
- Find the imported Super Metrics and toggle them to Enabled.
- Save the policy.
After the next collection cycle (typically 5 minutes), the Super Metrics will begin calculating for all VMs governed by that policy.
Tip: If you have different policies for production vs. dev/test, you may only want these guardrails on the production policy. Dev/test environments might intentionally allow odd vCPU counts or smaller memory increments.
Using the Custom Metrics
Once activated, these Super Metrics appear as regular metrics on VM objects. You can:
- Add them as columns in a custom View or Dashboard alongside the native rightsizing metrics.
- Include them in scheduled Reports for quarterly capacity reviews.
- Compare the native recommended value against your guardrail-adjusted value to quantify the difference.
A useful dashboard layout:
| Column | Source | Purpose |
|---|---|---|
| VM Name | Built-in | Identifies the VM |
| Current vCPUs | `cpu | corecount_provisioned` |
| Native Recommended vCPUs | Brock’s original super metric | What the engine says |
| Even Recommended vCPUs | Your imported super metric | Guardrail-adjusted target |
| Current Memory (KB) | `config | hardware |
| Memory Recommended (2GB+ only) | Your imported super metric | Only meaningful changes |
Adjusting the Thresholds
| Guardrail | Current Value | To Adjust |
|---|---|---|
| vCPU rounding | Nearest even (÷2 ×2) | Change the divisor to 4 for multiples of 4 (÷4 ×4) |
| Memory threshold | 2 GB (2,097,152 KB) | Change 2097152 to 4194304 for a 4 GB minimum |
Edit the formula directly in the Super Metric editor and click Validate to confirm.
Downloads
| File | Description |
|---|---|
| Recommended vCPUs Even (Oversized VMs).json | Even vCPU target for oversized VMs |
| Recommended vCPUs Even (Undersized VMs).json | Even vCPU target for undersized VMs |
| Memory Recommended 2GB Min (Oversized VMs).json | Memory target with 2 GB minimum reduction |
| Memory Recommended 2GB Min (Undersized VMs).json | Memory target with 2 GB minimum addition |
Import all four into Infrastructure Operations > Configuration > Super Metrics > ⋯ > Import.