If you are like me, you like to tinker with your homelab once in a while but perhaps it doesn’t make sense to have it up and running all of the time. Saving some money on power consumption and also reducing the amount of warm air the homelab produces may also be high on your wishlist.
My homelab consists of 3 Minisforum MS-A2 hosts, connected to a 10Gbps Unifi XG16 switch and home automation is done using Homey Pro in my house. I’m running VMware VCF 9.1 in the homlab as well. Usually I don’t want the homelab running when it’s not being used, so I’ve created 2 scripts to automte bringing the homelab on- and offline. The two scripts combine powering on/off hosts and switches in Homey Pro, and managing (start/stop) VCF services and VMs using PowerShell/PowerCLI. Shutting down the homelab is done in a clean way – a graceful shutdown if you will. You don’t just want to cut the power to a running VMware VCF environmemt, I don’t think vSAN, the VMs and Kubernets clusters would cope in the long run.
One script is used to bring the homelab on-line (Full-VCF-9-1-Start-up.ps1), a couple of variables will dictate wheter I want to bring the VMware VCF environment completely up or if to only get the hosts and vCenter up and running leaving the VCF services (vSAN, VCF Management services, SDDC manager and so on) unavailable.
The second script (Full-VCF-9-1-Shut-down.ps1) will do the same but in reverse – meaning it will shut down the VMware VCF environment including the hosts and the switch the homelab is connected to or, again, using variables to only shutdown the VCF services (vSAN, VCF Management services, SDDC manager and so on) but leave the hosts and the switch still powered on.
All configurations are stored in one file (sample-variables.ps1). Display names of VMs, vCenter fully qualified domain name, IP address to Homey Pro, access token for Homey Pro and so on are all stored in the configuration file. The same configuration file can be called from both the startup- as well as the shutdown script.
By separating the configuration from the main logic in the scripts themselves makes it possible to have multiple configuration files. Perhaps you have multiple VCF fleets in your homelab?
https://github.com/ArrowECS-Niclas/VCF9.1-Homelab

The VCF management service (all services running inside a kubernetes cluster) is shut down using a script (https://github.com/WardVissers/VCF-Public/blob/main/vcf_services_runtime_shutdown.ps1) that needs to be downloaded and put in the same folder as the shutdown script (Full-VCF-9-1-Shut-down.ps1). It is a Linux shell script that has been converted into a PowerShell script by Ward Visser (https://www.wardvissers.nl/2026/07/08/vcf-9-1-how-to-safely-shut-down-the-services-runtime-cluster-using-powershell/)

One Reply to “VMware VCF 9.1 Homelab”
Comments are closed.