Are you facing a challenge in cleaning up vCLS VMs in vSphere 7.x? vCLS is part of the vSphere Cluster Services (vCLS) framework introduced in VMware vSphere 7.0. This framework is designed to provide a set of common infrastructure services that can be used by various vSphere features. The primary purpose of vCLS is to provide infrastructure services for the proper functioning of vSphere features such as vSphere Distributed Resource Scheduler (DRS) and vSphere High Availability (HA). It includes services like the vCLS agent, which manages the vCLS VMs (Virtual Machines) that run on each ESXi host in the cluster.
The vCLS VMs are lightweight virtual machines that run a minimal Linux-based operating system. They are responsible for hosting the necessary infrastructure services, and ensuring that these services are available and can be used by other vSphere features.
My Challenge on vCLS
vCLS VMs were initially created on the TrueNAS datastore but it got destroyed due to hardware failure on it. Currently, vCLS VMs are turned off and stuck in the orphaned datastore. Due to system created VMS, I am able to migrate to a new datastore. Here is the snapshots of my VCLS VMs
Since i am unable to remove or migrate the VMs, i couldn’t clean up the non-existing datastore as well.
Here is my plan to clean up the vCLS:
- Disable the vCLS and clean up the VMs
- Remove the orphaned datastore.
How to disable the vCLS?
1. Identify the domain Identifier for your cluster.
Ex: http://192.168.23.101/ui/app/cluster;nav=h/urn:vmomi:ClusterComputeResource:domain-c2038:0d215e8a-0c4e-4c09-ae70-a0a4fbbe953e/summary
2. Navigate to vCenter. Click on Configure and Advance settings. Click on “Edit Settings”
3. Add new value like below. You need to update the “<identifier>” based on step 1. Once you updated Name & Value, click on “Add” and save the settings.
- Format – config.vcls.clusters.domain-<identifier>.enabled — > false
- My environment – config.vcls.clusters.domain-c2038.enabled — > false
4. In a few seconds, vCLS will be removed from your environment.
5. The orphaned datastore also cleaned up automatically as soon as vCLS VMs disappeared.
6. Once you have cleaned up the inaccessible vCLS VMs, we need to enable the vCLS services back since DRS services are tightly integrated with it. In Step 3, we just need to update the value to “true” in order to bring back the vCLS VMs.
7. Here we can see that vCLS VMs are back in operation.
This method can be used to perform maintenance on the cluster and enable the vCLS back once the maintenance is completed. Hope this article is informative to you.
Denis says
It helped me a lot.
Thanks!