WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Easily disable vSphere Cluster Services (vCLS) using UI/API in vSphere 8.0 Update 2

Easily disable vSphere Cluster Services (vCLS) using UI/API in vSphere 8.0 Update 2

09.21.2023 by William Lam // 5 Comments

As shared on Twitter/X yesterday, I just learned that we have made it much easier to disable (as well as enable) the vSphere Cluster Services (vCLS) using the vSphere UI and API in the upcoming vSphere 8.0 Update 2 release. vCLS is enabled by default when a new vSphere Cluster is created and is required for vSphere DRS functionality but there may be scenarios where you are not using vSphere DRS or if you need to perform some clean up, one easy way is to simply disable and re-enable the vCLS service

The current method today for disabling vCLS is by putting a vSphere Cluster into what is called Retreat Mode, which involves adding a new vCenter Server Advanced Setting that contains the Managed Object Reference (MoRef ID) of the vSphere Cluster that you wish to disable vCLS on. If that sounds a bit complicated, it certainly can be and this needs to be done for each and every vSphere Cluster that you wish to disable vCLS, which can add an additional operational overhead.

In vSphere 8.0 Update 2, we now have a much simpler way to manage this vCLS configuration in vSphere UI, by using the new vCLS Mode which is defined under a vSphere Cluster located under vSphere Cluster Services->General.


As mentioned earlier, vCLS is enabled by default and the vCLS Mode will show up as "System Managed" but if you decided to disable vCLS, then the vCLS Mode will show up as "Retreat Mode".


The vCLS simplification extends beyond just a vSphere UI enhancement and it also introduces a new vSphere API property that can be used to easily update the vCLS Mode. A new property called deploymentMode, which accepts two enumerated values SYSTEM_MANAGED or ABSENT to represent whether vCLS is enabled or disabled respectively on a vSphere Cluster. This new deploymentMode property will be part of the SystemVMsConfigSpec object which is then passed to the ReconfigureComputeResource_Task() API and will reconfigure a vSphere Cluster vCLS Mode.

Note: An updated version of PowerCLI that supports vSphere 8.0 Update 2 will be required to access any new vSphere 8.0 Update 2 APIs.

Here is a PowerCLI example demonstrating the retrieval of the current vCLS Mode using this new vSphere API:

$clusterName = "Nested-Cluster"
(Get-Cluster $clusterName).ExtensionData.ConfigurationEx.SystemVMsConfig.DeploymentMode


Here is a PowerCLI example demonstrating the update of the vCLS Mode from the default value (SYSTEM_MANAGED) to the Retreat mode (ABSENT) using this new vSphere API:

$clusterSystemVMSpec = New-Object VMware.Vim.ClusterSystemVMsConfigSpec
# ABSENT = vCLS Disabled
# SYSTEM_MANAGED = vCLS Enabled
$clusterSystemVMSpec.DeploymentMode = "ABSENT"

$clusterSpec = New-Object VMware.Vim.ClusterConfigSpecEx
$clusterSpec.SystemVMsConfig = $clusterSystemVMSpec

$task = (Get-Cluster $clusterName).ExtensionData.ReconfigureComputeResource_Task($clusterSpec,$true)
$task1 = Get-Task -Id ("Task-$($task.value)")
$task1 | Wait-Task


If we now look at either the vSphere UI or API, we can confirm that vCLS Mode has been updated to have vCLS disabled.


One last thing to be aware of when disabling vCLS is that a new vSphere Alarm is generated that states vCLS has been disabled which can be useful for tracking/compliance purposes. This new vCLS alarm can be acknowledge but there is still a secondary issue that will persists when navigating to the summary view of a vSphere Cluster and can not be suppressed or disabled. This vCLS persisted issue is the current existing behavior, so just something to be aware of.

More from my site

  • Incorrect guestOS type for Nested ESXi causes vCLS issues with VMware Cloud Foundation (VCF) Holodeck Toolkit
  • Is there a vSphere REST API for ...
  • New detailed GuestOS data in vSphere 8.0 Update 2
  • ESXi on Lenovo ThinkStation P3 Ultra
  • Quick Tip - vSphere 7.0 Update 3o also supports disabling/enabling vSphere Cluster Services (vCLS) in vSphere UI

Categories // Automation, vSphere 8.0 Tags // vCLS, vSphere 8.0 Update 2

Comments

  1. *protectedLouis says

    09/22/2023 at 11:05 am

    We use this feature alot for remote sites where site power maintenance occurs and we ensure a clean shutdown occurs. Having it in the UI will make it easier however what type of permissions are required for this action? Is it an option we could select for a certain role?

    Reply
  2. *protectedJohn M says

    09/27/2023 at 9:42 am

    How long before we can expect a PowerCLI version that supports this?

    Reply
    • William Lam says

      09/27/2023 at 11:11 am

      PowerCLI release can lag up to a month from what I recall in the past, sometimes it’s a few weeks but can be longer

      Reply
  3. *protectedMike says

    11/07/2024 at 4:55 am

    Hi,
    today i tried to disable vSphere Cluster Services (vCLS) using UI/API in vSphere 8.0 Update 2.
    i tried with powershell 5.x and 7.x.
    my VMware.Powercli is 13.3.0 buid 24145081

    each time i try the second line i get an error:

    $clusterSystemVMSpec.DeploymentMode = "ABSENT"
    InvalidOperation: The property 'DeploymentMode' cannot be found on this object. Verify that the property exists and can be set.

    what's the point?
    what am i missing?

    Reply
    • William Lam says

      11/07/2024 at 6:15 am

      If you’re positive you’ve got 80U2 running on both VC/ESXi, then double check you’ve actually got latest PCLI install, it’s common that two versions are installed side by side or you actually don’t have latest which exposes property and hence (expected) message you’re seeing

      Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...