// Module included in the following assemblies: // //* installing/Installing-vsphere-installer-provisioned-customizations.adoc [IPI] //* installing/installing-vsphere.adoc [UPI] //* installing/installing-vsphere-network-customizations.adoc [UPI] //* installing/installing-restricted-networks-installer-provisioned-vsphere.adoc [IPI] //* installing/installing-restricted-networks-vsphere.adoc [IPI] :_mod-docs-content-type: PROCEDURE [id="configuring-vsphere-regions-zones_{context}"] = Configuring regions and zones for a VMware vCenter You can modify the default installation configuration file, so that you can deploy an {product-title} cluster to multiple vSphere data centers. The default `install-config.yaml` file configuration from the previous release of {product-title} is deprecated. You can continue to use the deprecated default configuration, but the `openshift-installer` will prompt you with a warning message that indicates the use of deprecated fields in the configuration file. .Prerequisites * You have an existing `install-config.yaml` installation configuration file. + [IMPORTANT] ==== You must specify at least one failure domain for your {product-title} cluster, so that you can provision data center objects for your VMware vCenter server. Consider specifying multiple failure domains if you need to provision virtual machine nodes in different data centers, clusters, datastores, and other components. To enable regions and zones, you must define multiple failure domains for your {product-title} cluster. ==== + * You have installed the `govc` command line tool. + [IMPORTANT] ==== The example uses the `govc` command. The `govc` command is an open source command available from VMware; it is not available from Red{nbsp}Hat. The Red{nbsp}Hat support team does not maintain the `govc` command. Instructions for downloading and installing `govc` are found on the VMware documentation website. ==== .Procedure . Create the `openshift-region` and `openshift-zone` vCenter tag categories by running the following commands: + [IMPORTANT] ==== If you specify different names for the `openshift-region` and `openshift-zone` vCenter tag categories, the installation of the {product-title} cluster fails. ==== + [source,terminal] ---- $ govc tags.category.create -d "OpenShift region" openshift-region ---- + [source,terminal] ---- $ govc tags.category.create -d "OpenShift zone" openshift-zone ---- . For each region where you want to deploy your cluster, create a region tag by running the following command: + [source,terminal] ---- $ govc tags.create -c ---- . For each zone where you want to deploy your cluster, create a zone tag by running the following command: + [source,terminal] ---- $ govc tags.create -c ---- . Attach region tags to each vCenter data center object by running the following command: + [source,terminal] ---- $ govc tags.attach -c / ---- . Attach the zone tags to each vCenter cluster object by running the following command: + [source,terminal] ---- $ govc tags.attach -c //host/ ---- . Change to the directory that contains the installation program and initialize the cluster deployment according to your chosen installation requirements. + .Sample `install-config.yaml` file with multiple data centers defined in a vSphere center [source,yaml] ---- # ... compute: --- vsphere: zones: - "" - "" # ... controlPlane: # ... vsphere: zones: - "" - "" # ... platform: vsphere: vcenters: # ... datacenters: - - failureDomains: - name: region: zone: server: topology: datacenter: computeCluster: "//host/" networks: - datastore: "//datastore/" resourcePool: "//host//Resources/" folder: "//vm/" - name: region: zone: server: topology: datacenter: computeCluster: "//host/" networks: - datastore: "//datastore/" resourcePool: "//host//Resources/" folder: "//vm/" # ... ----