---
title: Control plane configuration options for VMware vSphere
---

# Control plane configuration options for VMware vSphere {#cpmso-config-options-vsphere}

You can update your control plane machines to reflect changes in your infrastructure or environment by editing values in the control plane machine set specification.

When you save an update to the control plane machine set, the Control Plane Machine Set Operator updates the control plane machines according to your configured update strategy. For more information, see "Updating the control plane configuration".

The following example YAML snippets show provider specification and failure domain configurations for a vSphere cluster.

## Sample vSphere provider specification {#cpmso-yaml-provider-spec-vsphere_cpmso-config-options-vsphere}

You can update your control plane machines to reflect changes in your underlying infrastructure by editing values in the control plane machine set provider specification.

The following example YAML illustrates a valid configuration for a VMware vSphere cluster.

> [!NOTE]
> When you create a control plane machine set for an existing cluster, the provider specification must match the `providerSpec` configuration in the control plane machine custom resource (CR) that the installation program creates.

You can omit any field that has a value set in the failure domain section of the CR.

```yaml {title="Sample vSphere providerSpec values"}
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
metadata:
  name: cluster
  namespace: openshift-machine-api
spec:
# ...
  template:
# ...
      spec:
        providerSpec:
          value:
            apiVersion: machine.openshift.io/v1beta1
            credentialsSecret:
              name: vsphere-cloud-credentials
            dataDisks:
            - name: "<disk_name>"
              provisioningMode: "<mode>"
              sizeGiB: 20
            diskGiB: 120
            kind: VSphereMachineProviderSpec
            memoryMiB: 16384
            metadata:
              creationTimestamp: null
            network:
              devices:
              - networkName: <vm_network_name>
            numCPUs: 4
            numCoresPerSocket: 4
            snapshot: ""
            template: <vm_template_name>
            userDataSecret:
              name: master-user-data
            workspace:
              datacenter: <vcenter_data_center_name>
              datastore: <vcenter_datastore_name>
              folder: <path_to_vcenter_vm_folder>
              resourcePool: <vsphere_resource_pool>
              server: <vcenter_server_ip>
```

where:

`spec.template.spec.providerSpec.value.credentialsSecret`
:   Specifies the secret name for the cluster. Do not change this value.

`spec.template.spec.providerSpec.value.dataDisks`
:   Specifies one or more data disk definitions. For more information, see "Configuring data disks by using machine sets".

`spec.template.spec.providerSpec.value.diskGiB`
:   Specifies the VM disk size for the control plane machines.

`spec.template.spec.providerSpec.value.kind`
:   Specifies the cloud provider platform type. Do not change this value.

`spec.template.spec.providerSpec.value.memoryMiB`
:   Specifies the memory allocated for the control plane machines.

`spec.template.spec.providerSpec.value.network`
:   Specifies the network on which to deploy the control plane.

    > [!NOTE]
    > If the cluster uses a failure domain, configure this parameter in the failure domain. If you specify this value in the provider specification when using a failure domain, the Control Plane Machine Set Operator ignores it and uses the value in the failure domain.

`spec.template.spec.providerSpec.value.numCPUs`
:   Specifies the number of CPUs allocated for the control plane machines.

`spec.template.spec.providerSpec.value.numCoresPerSocket`
:   Specifies the number of cores for each control plane CPU.

`spec.template.spec.providerSpec.value.template`
:   Specifies the vSphere VM template to use, such as `user-5ddjd-rhcos`.

    > [!NOTE]
    > If the cluster uses a failure domain, configure this parameter in the failure domain. If you specify this value in the provider specification when using a failure domain, the Control Plane Machine Set Operator ignores it and uses the value in the failure domain.

`spec.template.spec.providerSpec.value.userDataSecret`
:   Specifies the control plane user data secret. Do not change this value.

`spec.template.spec.providerSpec.value.workspace`
:   Specifies the workspace details for the control plane.

    > [!NOTE]
    > If the cluster uses a failure domain, configure this parameter in the failure domain. If you specify this value in the provider specification when using a failure domain, the Control Plane Machine Set Operator ignores it and uses the value in the failure domain.

    The following keys in this stanza specify additional details:

`datacenter`
:   Specifies the vCenter datacenter for the control plane.

`datastore`
:   Specifies the vCenter datastore for the control plane.

`folder`
:   Specifies the path to the vSphere VM folder in vCenter, such as `/dc1/vm/user-inst-5ddjd`.

`resourcePool`
:   Specifies the vSphere resource pool for your VMs.

`server`
:   Specifies the vCenter server IP or fully qualified domain name.

## Sample VMware vSphere failure domain configuration {#cpmso-yaml-failure-domain-vsphere_cpmso-config-options-vsphere}

To prevent downtime for your applications due to the failure of a single VMware vSphere region, you can configure failure domains in the control plane machine set by configuring appropriate values in the `failureDomains` section of the `ControlPlaneMachineSet` object.

On vSphere infrastructure, the cluster-wide infrastructure custom resource definition (CRD), `infrastructures.config.openshift.io`, defines failure domains for your cluster. A failure domain is an infrastructure resource made up of a control plane machine set, a vCenter data center, vCenter datastore, and a network. The `providerSpec` in the `ControlPlaneMachineSet` custom resource (CR) specifies names for failure domains that the control plane machine set uses to ensure control plane nodes deploy on the appropriate failure domain.

By using a failure domain resource, you can use a control plane machine set to deploy control plane machines on separate clusters or data centers. A control plane machine set also balances control plane machines across defined failure domains to improve fault tolerance capabilities for your infrastructure.

> [!NOTE]
> If you change the `ProviderSpec` configuration in the `ControlPlaneMachineSet` CR, the Control Plane Machine Set Operator updates the control plane machines according to your configured update strategy.

```yaml {title="Sample VMware vSphere failure domain values"}
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
metadata:
  name: cluster
  namespace: openshift-machine-api
spec:
# ...
  template:
# ...
    machines_v1beta1_machine_openshift_io:
      failureDomains:
        vsphere:
        - name: <failure_domain_name_1>
        - name: <failure_domain_name_2>
        platform: VSphere
# ...
```

where:

`spec.template.machines_v1beta1_machine_openshift_io.failureDomains.vsphere.name`
:   Each instance of `name` specifies a failure domain.

    > [!IMPORTANT]
    > Each `name` field value in the stanza must match the corresponding value in the `failureDomains.name` field of the cluster-wide infrastructure CRD. You can find the value of the `failureDomains.name` field by running the following command:
    >
    > ```terminal
    > $ oc get infrastructure cluster -o=jsonpath={.spec.platformSpec.vsphere.failureDomains[0].name}
    > ```
    >
    > The `name` field is the only supported failure domain field that you can specify in the `ControlPlaneMachineSet` CR.

    For an example of a cluster-wide infrastructure CRD that defines resources for each failure domain, see "Specifying multiple regions and zones for your cluster on vSphere."

`spec.template.machines_v1beta1_machine_openshift_io.failureDomains.platform`
:   Specifies the cloud provider platform name. Do not change this value.

**Additional resources**
{._additional-resources}

- [Updating the control plane configuration](/openshift-docs-markdown/machine_management/control_plane_machine_management/cpmso-managing-machines#cpmso-feat-config-update_cpmso-managing-machines)
- [Configuring VMware vSphere features for control plane machines](/openshift-docs-markdown/machine_management/control_plane_machine_management/cpmso_provider_configurations/cpmso-supported-features-vsphere#cpmso-supported-features-vsphere)
- [Specifying multiple regions and zones for your cluster on vSphere](/openshift-docs-markdown/installing/installing_vsphere/post-install-vsphere-zones-regions-configuration#specifying-regions-zones-infrastructure-vsphere_post-install-vsphere-zones-regions-configuration)
