Cluster Capacity Considering Failed ESXi Hosts with VCF Operations
- Brock Peterson

- 4 minutes ago
- 2 min read
I wanted to determine if my vSphere Clusters had enough CPU and Memory capacity to withstand one or two failed ESXi Hosts. Here's how I did it.
First, I calculated several Super Metrics:
Cluster CPU Free
Cluster CPU Free after 1 Failed ESXi Host
Cluster CPU Free after 2 Failed ESXi Hosts
Cluster Memory Free
Cluster Memory Free after 1 Failed ESXi Host
Cluster Memory Free after 2 Failed ESXi Hosts
These are relatively straight forward. You'll notice I'm taking the max() of the ESXi Host CPU/Memory Capacity in case not all ESXi Hosts have the same amount. In order, they look like this.
{This Resource: cpu|capacity_provisioned} - {This Resource: cpu|usagemhz_average}
({This Resource: cpu|capacity_provisioned} - {This Resource: cpu|usagemhz_average}) - max({Host System: CPU|Total Capacity, depth=1})
({This Resource: cpu|capacity_provisioned} - {This Resource: cpu|usagemhz_average}) - (max({Host System: CPU|Total Capacity, depth=1}))*2
{This Resource: mem|host_provisioned} - {This Resource: mem|total_need}
({This Resource: mem|host_provisioned} - {This Resource: mem|total_need}) - max({Host System: Memory|Total Capacity, depth=1})
({This Resource: mem|host_provisioned} - {This Resource: mem|total_need}) - (max({Host System: Memory|Total Capacity, depth=1}))*2
I then created Super Metrics analyzing the results:
Capacity for 1 Failed ESXi Host (1=YES | 0=NO)
Capacity for 2 Failed ESXi Hosts (1=YES | 0=NO)
These were a bit more complicated, but I basically said if both CPU and Memory Capacity Free > 0 then we're good, otherwise we're not. In order, they look like this.
(({This Resource: Super Metrics|CPU Free after 1 Failed Host} > 0) && ({This Resource: Super Metrics|Memory Free after 1 Failed Host} > 0)) ? 1 : 0
(({This Resource: Super Metrics|CPU Free after 2 Failed Hosts} > 0) && ({This Resource: Super Metrics|Memory Free after 2 Failed Hosts} > 0)) ? 1 : 0If you'd like these Super Metrics you can get them here.
Once I had my Super Metrics in place, I used them in a Dashboard to visualize the data, this is what I came up with.

You'll notice I put color schemes on them to represent enough capacity (or not). If you'd like this Dashboard (and Views) you can get it here. Pretty cool use of Super Metrics to get what we needed, hope this was helpful!
Comments