How to prevent HADCS/vCLS VMs to be placed in certain datastores for vSphere ESXi 7.0 U1 and 7.0 U2
search cancel

How to prevent HADCS/vCLS VMs to be placed in certain datastores for vSphere ESXi 7.0 U1 and 7.0 U2

book

Article ID: 318161

calendar_today

Updated On: 09-22-2024

Products

VMware vCenter Server

Issue/Introduction

vSphere Cluster Services (vCLS) is a new feature in vSphere 7.0 Update 1. This feature ensures cluster services such as vSphere DRS and vSphere HA are all available to maintain the resources and health of the workloads running in the clusters independent of the vCenter Server instance availability.

Please see the following article for more information: vSphere Cluster Services (vCLS) in vSphere 7.0 Update 1 (80472)

Those VM will be provisioned on shared storage, if available during provisioning, otherwise it will go to local VMFS. Today is not possible to specify which datastores should be used for provisioning the vCLS VMs to, so in certain situations you need to avoid/prevent VMs being created in specific datastores

Note: If you need to prevent placing the vCLS VMs in certain clusters, you can use the retreat mode. Please follow the same article above  vSphere Cluster Services (vCLS) in vSphere 7.0 Update 1 (80472)

Environment

VMware vCenter Server 7.0.x

Resolution

There's a new feature in vSphere 7.0 U3 where you can override default vCLS VM datastore placement. For more information, see vCLS Datastore Placement

Workaround:
The below workaround can be applied only if vSphere ESXi version is prior to 7.0 U3. For 7.0 U3 and later versions, please see the resolution section.

SRM defines tag categories to label datastores with tags with the following IDs:
 
1. SRM-com.vmware.vcDr:::consistencyGroup
2. SRM-com.vmware.vcDr:::protectionGroup
3. SRM-com.vmware.vcDr:::status

 
Consistency group tags have names with prefix "SRM-CG-"
Protection group tags have names with prefix "SRM-PG-"
 
Tag names for tags from status category are: "replicated", "test", "deactivated".

Starting in vSphere 7.0. Update 1A, a datastore tagged as SRM-protected will not be used to deploy vCLS VMs
In the case of vCLS VMs already placed on a SRM-protected datastore, they will be deleted and re-created on another datastore.

E.g tagging with SRM-com.vmware.vcDr:::protectionGroup as category for the iSCSI-FreeNAS datastore will prevent vCLS VMs to be placed on it, or in case that they're already created, they will be removed and placed on another datastore.




In order to tag a datastore as SRM-protected, eg. by using Category "SRM-com.vmware.vcDr:::protectionGroup":
  1. Select the datastore you want to tag, then go to Summary view
  2. Under tags pane, press Assign...
  3. Press ADD TAG
  4. Press Create New Category
  5. Under Category name you need to enter one of the three categories that will be recognized as SRM-protected, in this case, e.g SRM-com.vmware.vcDr:::protectionGroup. You can leave Tags per object as One tag, and need to keep at least Datastore selected. You may leave this as default. Press Create
  6. You are returned to the "Create Tag" dialog. Enter a name for the tag, e.g. "Datastore_Protected" and select the category created in the step before. Note: the name of the tag is not relevant for protection. What is needed is that the category matches. Press Create
  7. You are returned to "Assign Tag" dialog.  Select the tag created in previous step and click Assign

In the case that you need to allow the datastore to be used again for creating vCLS VMs, just remove the assigned tag/category.

Note: For more information, please check the documentation at vSphere Tags and Attributes