Back to Checks
vcf

Clusters have a minimum number of hosts

clusters_minimum_hosts
Service: clustersSeverity: medium
OfficialVerifiedVMware Cloud FoundationPrivate
Categories:resilience
Resource Type:Cluster

VCF clusters have at least the configured minimum number of hosts (default 3) so they can survive a single host failure without breaking vSphere HA admission control.

Risk

Clusters with fewer than 3 hosts cannot tolerate a host failure while maintaining vSphere HA admission control, breaking availability of running workloads.

Run this check with Prowler

Run in Prowler Cloud
Install
pip install --extra-index-url https://__token__:${PROWLER_REGISTRY_DOWNLOAD_API_KEY}@registry.prowler.com/simple/ "prowler-provider-vcf[runtime]"
Run
prowler vcf --checks clusters_minimum_hosts

Recommendation

Provision each cluster with at least 3 hosts so it can tolerate one host failure and continue serving workloads.

Remediation

Other

1Add hosts to the cluster via the **SDDC Manager** UI under **Inventory > Workload Domains > Clusters**, or call `POST /v1/clusters/{id}/hosts` on the VCF API.

Check Code

from prowler.lib.check.models import Check
from prowler_provider_vcf.check_report import CheckReportVCF
from prowler_provider_vcf.services.clusters.clusters_client import clusters_client


class clusters_minimum_hosts(Check):
    def execute(self) -> list[CheckReportVCF]:
        findings = []
        min_hosts = clusters_client.audit_config.get("min_cluster_hosts", 3)
        for cluster in clusters_client.clusters:
            report = CheckReportVCF(
                metadata=self.metadata(),
                resource=cluster,
            )
            if cluster.host_count >= min_hosts:
                report.status = "PASS"
                report.status_extended = (
                    f"Cluster {cluster.name} has {cluster.host_count} hosts "
                    f"(minimum: {min_hosts})."
                )
            else:
                report.status = "FAIL"
                report.status_extended = (
                    f"Cluster {cluster.name} has only {cluster.host_count} host(s) "
                    f"(minimum: {min_hosts})."
                )
            findings.append(report)
        return findings