WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • 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 // 3 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

  • 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
  • ESXi on Lenovo ThinkStation P3 Tiny

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

Thanks for the comment!Cancel reply

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

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC) across Private, Hybrid and Public Cloud

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • vSphere Code Capture is your ChatGPT for vSphere Automation 11/30/2023
  • ESXi 8.0 Update 2 not detecting Apple NVMe on Apple Mac Mini 2018 11/28/2023
  • Is there a vSphere REST API for ... 11/21/2023
  • Custom vSAN HCL JSON for VMware Cloud Foundation (VCF) 5.1 and vSAN ESA using Nested ESXi 11/20/2023
  • Heads Up - Performance Impact with VMware Workstation on Windows 11 with Intel Hybrid CPUs 11/19/2023

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 © 2023

 

Loading Comments...