How to Disable vCLS on a Cluster via Retreat Mode
search cancel

How to Disable vCLS on a Cluster via Retreat Mode

book

Article ID: 316514

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

There is no way to disable vCLS on a vSphere cluster and still have vSphere DRS being functional on that cluster.

However, should it be necessary, you can disable vCLS on a cluster by following the Retreat Mode steps below, but this will impact some of the cluster services for that cluster.

Impact/Risks:

Note: Retreat Mode should be used with extra caution and should be used only for the purposes mentioned in this document. Below are the details of the impacted cluster services due to the enablement of Retreat Mode on a cluster: 

  1. vSphere DRS will not function on that cluster if DRS is enabled for that cluster. That means workloads running inside that cluster are not load-balanced, hence will not be migrated to different hosts within the cluster when the current host running that VM is running out of resources. Or, when a user want to take down a host for maintenance, running VMs will not be automatically migrated to other hosts within that cluster. 
  2. vSphere HA will not perform optimal placement during a host failure scenario as HA depends on DRS for placement recommendations. HA will still power-on the VMs but these VMs might be powered on in a less optimal host. 


Environment

VMware vCenter Server 8.0.x
VMware vCenter Server 7.0.x

Resolution

Retreat Mode Steps

Note: Starting in vSphere 7.0 U3o and 8.0 U2, entering Retreat Mode is now available as a Cluster setting within the vCenter Server UI.

vSphere 7.0 U3o/8.0 U2 and Later
  1. Log into vCenter's HTML5 client
  2. In Hosts and Clusters inventory, select a cluster.
  3. Click on the Configure tab.
  4. Under vSphere Cluster Services, select General.
  5. In the top right, click on EDIT VCLS MODE.
  1. In the Edit vCLS Mode pop up window, click on the second radio option Retreat Mode.
  1. Click OK.


For Versions Prior to vSphere 7.0 U3o and 8.0 U2, Using the vSphere Client
  1. Log in to the vSphere Client.
  2. Navigate to the cluster on which vCLS should be disabled. Copy the cluster domain id from the URL of the browser. It should be similar to 'domain-c<number>', not the entire string.
 

Notes: You only need to copy domain-c<number> part of the URL. For example: When you navigate to cluster in vSphere client, your URL will be similar to this: https://<fqdn-of-vCenter-server>/ui/app/cluster;nav=h/urn:vmomi:ClusterComputeResource:domain-c1006:ce4a7b9f-768c-2222-3333-############/summary. You only need to copy domain-c1006 to use in the steps below.
Using other values, for example the cluster UUID, or a combination of the cluster ID and the UUID, will result in vpxd failing to start when you next restart it. Therefore please be careful to only use the ID domain-c<number>.
If you already did add the wrong value by accident, causing vpxd to no longer start, you can remove the VCLS retreat mode settings from the vpxd.cfg configuration file. Take a backup of the vpxd.cfg, then run the following command:
# sed '/<vcls>/,/<\/vcls>/d' -i /etc/vmware-vpx/vpxd.cfg
This will remove all retreat mode settings from all of the clusters in this vCenter, but it will allow vpxd to start again
 
  1. Navigate to the vCenter Server and then to Configure tab.
  2. Click on Advanced setting section and then on Edit settings button.
  3. Add a new entry with name = config.vcls.clusters.domain-c<number>.enabled and value = False

    Note: True and False are case insensitive, so any case of these two values should be accepted.
     
  4. Click Save.
  5. vCLS monitoring service will initiate the clean-up of vCLS VMs and user will start noticing the tasks with the VM deletion. 
  6. If this cluster has DRS enabled, then it will not be functional and additional warning will be displayed in the cluster summary. DRS will be disabled until vCLS is re-enabled on this cluster. 
  7. To remove Retreat Mode from the cluster, change the value to True in step# 5 above. 

    Note: True and False are case insensitive, so any case of these two values should be accepted.
     
  8. Once you configure retreat mode on a cluster, the entry for the cluster will stay in the vCenter Advanced Settings. There is no way to delete this entry from vSphere Client, there will be no issue with keeping this entry.

Using APIs/CLIs

Use the attached retreatModeConfiguration.py script to configure retreat mode on multiple clusters on the VC.

Usage: python retreatModeConfiguration.py -r disable or python retreatModeConfiguration.py -r enable




Identifying vCLS VMs

  1. In the vSphere Client UI, vCLS VMs are named vCLS (<number>) where the number field is auto-generated. All vCLS VMs with the Datacenter of a vSphere Client are visible in the VMs and Template tab of the client inside a VMs and Templates folder named vCLS.




    If you click on the summary of these VMs, you will see a banner which reads vSphere Cluster Service VM is required to maintain the health of vSphere Cluster Services. Power state and resource of this VM is managed by vSphere Cluster Services, along with a Learn More link which takes you to the KB article. 
     
  2. Using vSphere Managed Object Browser (MOB)

    Identifying all the vCLS VMs for a given datacenter

    Sample MOB query examples: 

    Replace IP address and moid to a vCLS VM in these sample queries:

    https://<IP address>/mob/?moid=vm-1004&doPath=config.managedBy <then screenshot 1>
    https://<IP address>/mob/?moid=vm-1004&doPath=config.extraConfig%5b%22HDCS.agent%22%5d

Sample MOB query: 

Replace IP address and moid to a VM folder named vCLS in the sample query

https://<IP address>/mob/?moid=group-v16



Attachments

configure_retreat_mode_v2 get_app
retreatModeConfiguration get_app
configure_retreat_mode get_app