×

You can change the configuration of your VMware vSphere control plane machines by updating values in the control plane machine set. 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.

Sample YAML for configuring VMware vSphere clusters

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

Sample VMware vSphere provider specification

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 is created by the installation program.

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 (1)
            diskGiB: 120 (2)
            kind: VSphereMachineProviderSpec (3)
            memoryMiB: 16384 (4)
            metadata:
              creationTimestamp: null
            network: (5)
              devices:
              - networkName: <vm_network_name>
            numCPUs: 4 (6)
            numCoresPerSocket: 4 (7)
            snapshot: ""
            template: <vm_template_name> (8)
            userDataSecret:
              name: master-user-data (9)
            workspace:
              datacenter: <vcenter_datacenter_name> (10)
              datastore: <vcenter_datastore_name> (11)
              folder: <path_to_vcenter_vm_folder> (12)
              resourcePool: <vsphere_resource_pool> (13)
              server: <vcenter_server_ip> (14)
1 Specifies the secret name for the cluster. Do not change this value.
2 Specifies the VM disk size for the control plane machines.
3 Specifies the cloud provider platform type. Do not change this value.
4 Specifies the memory allocated for the control plane machines.
5 Specifies the network on which the control plane is deployed.
6 Specifies the number of CPUs allocated for the control plane machines.
7 Specifies the number of cores for each control plane CPU.
8 Specifies the vSphere VM template to use, such as user-5ddjd-rhcos.
9 Specifies the control plane user data secret. Do not change this value.
10 Specifies the vCenter Datacenter for the control plane.
11 Specifies the vCenter Datastore for the control plane.
12 Specifies the path to the vSphere VM folder in vCenter, such as /dc1/vm/user-inst-5ddjd.
13 Specifies the vSphere resource pool for your VMs.
14 Specifies the vCenter server IP or fully qualified domain name.

Sample VMware vSphere failure domain configuration

On VMware vSphere infrastructure, the cluster-wide infrastructure Custom Resource Definition (CRD), infrastructures.config.openshift.io, defines failure domains for your cluster. The providerSpec in the ControlPlaneMachineSet custom resource (CR) specifies names for failure domains. A failure domain is an infrastructure resource that comprises a control plane machine set, a vCenter datacenter, vCenter datastore, and a network.

By using a failure domain resource, you can use a control plane machine set to deploy control plane machines on hardware that is separate from the primary VMware vSphere infrastructure. A control plane machine set also balances control plane machines across defined failure domains to provide fault tolerance capabilities to your infrastructure.

If you modify the ProviderSpec configuration in the ControlPlaneMachineSet CR, the control plane machine set updates all control plane machines deployed on the primary infrastructure and each failure domain infrastructure.

Defining a failure domain for a control plane machine set is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.

Sample 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: (1)
        platform: VSphere
        vsphere: (2)
        - name: <failure_domain_name1>
        - name: <failure_domain_name2>
# ...
1 A failure domain defines the vCenter location for OpenShift Container Platform cluster nodes.
2 Defines failure domains by name for the control plane machine set.

Each failureDomains.platform.vsphere.name field value in the ControlPlaneMachineSet CR must match the corresponding value defined in the failureDomains.name field of the cluster-wide infrastructure CRD. Currently, the vsphere.name field is the only supported failure domain field that you can specify in the ControlPlaneMachineSet CR.