Shutting down VMware Cloud Foundation, for example, during hardware maintenance or power maintenance of the data center, and then starting it up must be done in a way that prevents data loss or appliance malfunction, and supports collection of troubleshooting data. You follow a strict order and steps for shutdown and startup of the VMware Cloud Foundation management components.

Shutting Down and Starting Up VMware Cloud Foundation by Using PowerShell

Instead of the default step-by-step approach by using product user interface, you can shut down the management domain or a VI workload domain in an automated way by running a Windows PowerShell script.

To shut down or start up the management domain or a VI workload domain, you run sample PowerShell scripts that come with the VMware.CloudFoundation.PowerManagement module in PowerShell Gallery. The scripts follow the order for manual shutdown and startup of VMware Cloud Foundation. You can complete the workflow manually at any point. You can also run the scripts multiple times.

If you want to provide feedback, report an issue with automation, or contribute to the VMware.CloudFoundation.PowerManagement module, go to the VMware.CloudFoundation.PowerManagement repository in GitHub.

Table 1. Supported Platforms
Platform Component Required Version or Configuration
Operation system Up-to-date versions of Windows 10, Windows 2016, Windows 2019 and Windows 2022, each running Windows PowerShell 7.2.4 or later
Server configuration vSAN ReadyNodes

The VMware.CloudFoundation.PowerManagement module has the following limitations:

  • VMware Cloud Foundation on VxRail is not supported.
  • Site Recovery Manager, vSphere Replication, vRealize Suite, Workspace ONE Access, and vSphere with Tanzu are not supported.
  • You must shut down the ESXi hosts manually. The scripts only place the hosts in maintenance mode.
  • You must shut down bare-metal NSX Edge nodes manually.
  • The SSH service on the ESXi hosts must be running.
  • The sample script for the management domain works only with a single cluster.
  • The sample scripts cannot handle simultaneous connections to multiple services. In the script's console, all sessions to services that are not used at the moment will be disconnected.
  • To shut down virtual machines in the management domain or in a VI workload domain by using a script, they must be running VMware Tools. The virtual machines are shut down in a random order by using the "Shutdown Guest OS" command in vCenter Server.

For step-by-step instructions and information on the VMware.CloudFoundation.PowerManagement configuration, see the Readme.md file inside the module.