Puts this vSphere cloud into maintenance mode, for example while the backing vCenter server itself is being patched, rebooted, or otherwise unavailable for VM operations.
While checked, any vsphere build step or pipeline call that would
otherwise talk to vCenter to change VM state (power on/off, revert to snapshot,
clone, delete, reconfigure, …) logs the message configured below to the build console
and then blocks, retrying periodically, until this checkbox is unchecked again. It
does not abort or fail the build; it simply waits.
This intentionally does not block agent provisioning, agent launch, or the idle-action teardown of an agent's VM (shutdown/suspend/revert/reset): those run on Jenkins' shared, size-limited agent-lifecycle thread pool, and blocking there for an open-ended maintenance window can starve that pool for every cloud and node on this Jenkins instance, not just this one. Only build-step/pipeline calls - which run on the build's own executor thread and have a console to log into - are gated.
This setting is saved as part of this cloud's configuration, so it survives a Jenkins restart: if Jenkins restarts while vCenter is still under maintenance, consumers will still find the cloud marked offline and continue to wait rather than failing outright.
Add the following keys under the vSphere cloud entry in your
jenkins.yaml. Both default to disabled/empty.
jenkins:
clouds:
- vSphere:
vsDescription: "My vCenter"
vsConnectionConfig:
vsHost: "https://vcenter.example.com"
credentialsId: "vcenter-creds"
instanceCap: 20
maxOnlineSlaves: 0
# --- Maintenance mode ---
maintenanceMode: true
maintenanceMessage: "vCenter is undergoing scheduled maintenance until 18:00 UTC."
templates:
- ...