VCF 9.1 How to Safely Shut Down the Services Runtime Cluster Using PowerShell

Broadcom provides an official procedure for gracefully shutting down a VMware Cloud Foundation (VCF) 9.1 Services Runtime cluster. The provided solution uses a Linux shell script (vcf_services_runtime_shutdown.sh), which works well on Linux systems but is less convenient for Windows administrators.

Rather than using Windows Subsystem for Linux (WSL) or a separate Linux machine, I converted the official shell script into a native PowerShell version. This allows the entire shutdown procedure to be executed directly from a Windows workstation while following the same workflow as the original Broadcom script.

Downloads

📦 VCF 9.1 Shutdown VCF Services VMs.ps1
📦 vcf_services_runtime_shutdown.ps1

📄 Original Broadcom Knowledge Base vcf_services_runtime_shutdown.sh

Why Use the Official Shutdown Procedure?

 Kubernetes workloads are gracefully terminated.
 Running services are stopped in the correct order.
 Databases remain in a consistent state.
 Cluster metadata is preserved.
 The shutdown process completes without leaving services in an inconsistent state.

Prerequisites

 VMware Cloud Foundation 9.1
 PowerShell 7.x (recommended)
 Latest VCF PowerCLI
 vCenter Administrator credentials
 Network connectivity to the Control Plane node

Before You Begin

 Power off any VCF Automation virtual machines before shutting down the Services Runtime cluster to avoid interference with automation tasks.

Determine the Control Plane Node IP Address

 Open VCF Operations.
 Navigate to Build → Lifecycle → Components.
 Select VCF Services Runtime.
 Scroll to the Nodes section.
 Locate a Control Plane node and note its IP address.

PowerShell Wrapper Script

 Detects the current script location.
 Changes to the correct working directory.
 Calls the shutdown script with the required parameters.
 Simplifies execution.

Download Wrapper Script

Download: Shutdown VCF Services.ps1

# VCF Services shutdown by Ward Vissers

# Variables

switch ((get-host).Name) {

‘Windows PowerShell ISE Host’ { $vcf_folder = $psISE.CurrentFile.FullPath -replace ($psISE.CurrentFile.DisplayName,””) }

ConsoleHost{ $vcf_folder = $myInvocation.MyCommand.Path -replace ($myInvocation.MyCommand.Name,”“) }

‘Visual Studio Code Host‘{ $vcf_folder = $psEditor.GetEditorContext().CurrentFile.Path | Split-Path }

}

# Go to the VCF folder

Set-Location $vcf_folder

$Credential = Get-Credential –UserNameadministrator@vsphere.local” -Message “vCenter Login Creds”

# Shutdown Test Run

.\vcf_services_runtime_shutdown.ps1 –DryRunNodeIp <your_node_here> –Credential $Credential

# Shutdown Run

.\vcf_services_runtime_shutdown.ps1 –DryRunNodeIp <your_node_here>  –Credential $Credential

Authenticate Securely

 Use Get-Credential instead of storing passwords in the script.

Perform a Dry Run

 Run the script with -DryRun to validate connectivity, authentication, environment configuration and cluster discovery without shutting down services.

.

Execute the Shutdown

 Connect to vCenter.
 Discover the Services Runtime cluster.
 Validate runtime nodes.
 Gracefully terminate Kubernetes workloads.
 Shut down runtime nodes.
 Verify successful completion.

Expected Result

 All VCF Services Runtime virtual machines are powered off in the correct order and the console reports a successful shutdown.

.

.

Conclusion

The PowerShell implementation follows the same workflow as Broadcom’s Linux script while allowing Windows administrators to perform the shutdown natively from Windows without WSL.

What’s Next?

 Automated startup & shutdown script for VCF 9.1 environment

Translate »