:_mod-docs-content-type: ASSEMBLY
[id="persistent-storage-vsphere"]
= VMware vSphere CSI Driver Operator
include::_attributes/common-attributes.adoc[]
:context: persistent-storage-csi-vsphere

toc::[]

== Overview

[role="_abstract"]
{product-title} can provision persistent volumes (PVs) using the Container Storage Interface (CSI) VMware vSphere driver for Virtual Machine Disk (VMDK) volumes.

Familiarity with xref:../../storage/understanding-persistent-storage.adoc#understanding-persistent-storage[persistent storage] and xref:../../storage/container_storage_interface/persistent-storage-csi.adoc#persistent-storage-csi[configuring CSI volumes] is recommended when working with a CSI Operator and driver.

To create CSI-provisioned persistent volumes (PVs) that mount to vSphere storage assets, {product-title} installs the vSphere CSI Driver Operator and the vSphere CSI driver by default in the `openshift-cluster-csi-drivers` namespace.

* *vSphere CSI Driver Operator*: The Operator provides a storage class, called `thin-csi`, that you can use to create persistent volumes claims (PVCs). The vSphere CSI Driver Operator supports dynamic volume provisioning by allowing storage volumes to be created on-demand, eliminating the need for cluster administrators to pre-provision storage. You can disable this default storage class if desired (see xref:../../storage/container_storage_interface/persistent-storage-csi-sc-manage.adoc#persistent-storage-csi-sc-manage[Managing the default storage class]).

* *vSphere CSI driver*: The driver enables you to create and mount vSphere PVs. In {product-title} 4.20, the driver version is 3.6.0 The vSphere CSI driver supports all of the file systems supported by the underlying Red Hat Core operating system release, including XFS and Ext4. For more information about supported file systems, see link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/managing_file_systems/overview-of-available-file-systems_managing-file-systems[Overview of available file systems].

//Please update driver version as needed with each major OCP release starting with 4.13.

//Listing the VMWare driver version here because it has a more variable set of features. The Operator version does not change independently (is parallel).

[NOTE]
====
For new installations, {product-title} 4.13 and later provides automatic migration for the vSphere in-tree volume plugin to its equivalent CSI driver. Updating to {product-title} 4.15 and later also provides automatic migration. For more information about updating and migration, see xref:../../storage/container_storage_interface/persistent-storage-csi-migration.adoc#persistent-storage-csi-migration[CSI automatic migration].

CSI automatic migration should be seamless. Migration does not change how you use all existing API objects, such as persistent volumes, persistent volume claims, and storage classes.
====

include::modules/persistent-storage-csi-about.adoc[leveloffset=+1]

include::modules/persistent-storage-csi-vsphere-limitations.adoc[leveloffset=+1]

include::modules/persistent-storage-csi-vsphere-stor-policy.adoc[leveloffset=+1]

include::modules/persistent-storage-csi-vsphere-rwx.adoc[leveloffset=+1]

include::modules/vmware-csi-driver-reqs.adoc[leveloffset=+1]

To remove a third-party CSI driver, see xref:../../storage/container_storage_interface/persistent-storage-csi-vsphere.adoc#persistent-storage-csi-vsphere-install-issues_persistent-storage-csi-vsphere[Removing a third-party vSphere CSI Driver].

include::modules/persistent-storage-csi-vsphere-install-issues.adoc[leveloffset=+1]

[id="vsphere-pv-encryption"]
== vSphere persistent disks encryption

You can encrypt virtual machines (VMs) and dynamically provisioned persistent volumes (PVs) on {product-title} running on top of vSphere.

[NOTE]
====
{product-title} does not support RWX-encrypted PVs. You cannot request RWX PVs out of a storage class that uses an encrypted storage policy.
====

You must encrypt VMs before you can encrypt PVs, which you can do during or after installation.

For information about encrypting VMs, see:

* xref:../../installing/installing_vsphere/upi/upi-vsphere-installation-reqs.adoc#installation-vsphere-encrypted-vms_upi-vsphere-installation-reqs[Requirements for encrypting virtual machines]

* xref:../../installing/installing_vsphere/upi/installing-vsphere.adoc#installation-vsphere-machines_installing-vsphere[During installation: Step 7 of Installing RHCOS and starting the {product-title} bootstrap process]

* xref:../../installing/installing_vsphere/vsphere-post-installation-encryption.adoc#vsphere-post-installation-encryption[Enabling encryption on a vSphere cluster]

After encrypting VMs, you can configure a storage class that supports dynamic encryption volume provisioning using the vSphere Container Storage Interface (CSI) driver. This can be accomplished in one of two ways using:

* xref:../../storage/container_storage_interface/persistent-storage-csi-vsphere.adoc#persistent-storage-csi-vsphere-encryption-datastore-url_persistent-storage-csi-vsphere[Datastore URL]: This approach is not very flexible, and forces you to use a single datastore. It also does not support topology-aware provisioning.

* xref:../../storage/container_storage_interface/persistent-storage-csi-vsphere.adoc#persistent-storage-csi-vsphere-encryption-tag-based_persistent-storage-csi-vsphere[Tag-based placement]: Encrypts the provisioned volumes and uses tag-based placement to target specific datastores.

include::modules/persistent-storage-csi-vsphere-encryption-datastore-url.adoc[leveloffset=+2]

include::modules/persistent-storage-csi-vsphere-encryption-tag-based.adoc[leveloffset=+2]

include::modules/persistent-storage-csi-vsphere-multi-vcenter-support-overview.adoc[leveloffset=+1]

include::modules/persistent-storage-csi-vsphere-multi-vcenter-support-procedure-install.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources
[id="link_installation_config_parameters_vsphere"]
* xref:../../installing/installing_vsphere/installation-config-parameters-vsphere.adoc[Installation configuration parameters for vSphere].

include::modules/persistent-storage-csi-vsphere-top-aware-overview.adoc[leveloffset=+1]

include::modules/persistent-storage-csi-vsphere-top-aware-during-install.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources
* xref:../../installing/installing_vsphere/ipi/installing-vsphere-installer-provisioned-customizations.adoc#configuring-vsphere-regions-zones_installing-vsphere-installer-provisioned-customizations[Configuring regions and zones for a VMware vCenter]

include::modules/persistent-storage-csi-vsphere-top-aware-post-install.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources
* xref:../../installing/installing_vsphere/post-install-vsphere-zones-regions-configuration.adoc#specifying-regions-zones-infrastructure-vsphere_post-install-vsphere-zones-regions-configuration[Specifying multiple regions and zones for your cluster on vSphere]
* https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-16422FF7-235B-4A44-92E2-532F6AED0923.html?hWord=N4IghgNiBcIC5gOYgL5A[VMware vSphere tag documentation]

include::modules/persistent-storage-csi-vsphere-top-aware-infra-top.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources
* https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-16422FF7-235B-4A44-92E2-532F6AED0923.html?hWord=N4IghgNiBcIC5gOYgL5A[VMware vSphere tag documentation]

include::modules/persistent-storage-csi-vsphere-top-aware-results.adoc[leveloffset=+2]

include::modules/persistent-storage-csi-vsphere-change-max-snapshot.adoc[leveloffset=+1]

include::modules/persistent-storage-csi-vsphere-migrating-cns-vols-between-datastores.adoc[leveloffset=+1]

.Additional limitations
* link:https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-storage-8-0/getting-started-with-cloud-native-storage-in-vsphere/cloud-native-storage-for-vsphere-administrators/migrating-container-volumes-in-vsphere.html[For vSphere 8]

* link:https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/9-0/vsphere-storage/getting-started-with-cloud-native-storage-in-vsphere/cloud-native-storage-for-vsphere-administrators/migrating-container-volumes-in-vsphere.html#GUID-536DEB75-84F5-48DC-A425-3BF703B8F54E-en[For VCF 9]

For more general information, see:

* link:https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0.html[For vSphere v8.0]

* link:https://techdocs.broadcom.com/us/en/vmware-cis/vcf.html[For VCF 9]

include::modules/persistent-storage-csi-vsphere-disable-storage-overview.adoc[leveloffset=+1]

include::modules/persistent-storage-csi-vsphere-disable-storage-consequences.adoc[leveloffset=+2]

include::modules/persistent-storage-csi-vsphere-disable-storage-procedure.adoc[leveloffset=+2]

include::modules/persistent-storage-csi-vsphere-adding-bm-nodes.adoc[leveloffset=+1]

:FeatureName: Adding bare-metal nodes
include::snippets/technology-preview.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources
* xref:../../machine_management/user_infra/adding-bare-metal-compute-vsphere-user-infra.adoc[Adding bare-metal compute machines to a vSphere cluster]

include::modules/persistent-storage-csi-vsphere-increase-max-vols-per-node-overview.adoc[leveloffset=+1]

:FeatureName: Increasing volumes per node
include::snippets/technology-preview.adoc[leveloffset=+2]

include::modules/persistent-storage-csi-vsphere-increase-max-vols-per-node-procedure.adoc[leveloffset=+2]

== Additional resources
* xref:../../storage/container_storage_interface/persistent-storage-csi.adoc#persistent-storage-csi[Configuring CSI volumes]

* link:https://kb.vmware.com/s/article/1025279[Best practices for using VMware snapshots in the vSphere environment]

* link:https://techdocs.broadcom.com/us/en/vmware-cis/vsphere.html[VMware vCenter documentation]
