New to Kestra?
Use blueprints to kickstart your first workflows.
Automate VMware vCenter VM patching with Kestra: pre-patch snapshot, SSH OS upgrade, HTTP health probe, and automatic rollback on failure.
Patch VMware vCenter virtual machines safely with an automated snapshot, OS upgrade, health probe, and rollback workflow. This Kestra blueprint captures a pre-patch VM snapshot in vCenter, runs apt-get upgrade over SSH, reboots the guest, verifies a /health endpoint, and automatically restores the snapshot if anything goes wrong. It closes the gap between vCenter snapshot management, Linux package updates, and incident response on Slack, all in one declarative YAML flow.
pre_patch_snapshot calls io.kestra.plugin.ee.vmware.vcenter.CreateVmSnapshot to take a named snapshot (pre-patch-{{ execution.startDate }}) tagged with the Kestra execution id.apply_patches runs io.kestra.plugin.scripts.shell.Commands to SSH into the VM as ops@{{ inputs.vm_address }}, executes sudo apt-get update && sudo apt-get -y upgrade && sudo reboot, with allowFailure: true so the post-checks still run.wait_for_boot uses io.kestra.plugin.core.flow.Pause for PT1M to let the guest come back online.health_check calls io.kestra.plugin.core.http.Request against http://{{ inputs.vm_address }}/health with a constant retry policy (10 attempts, 30 seconds apart).notify_success posts a green Slack message via io.kestra.plugin.slack.notifications.SlackIncomingWebhook.errors branch fires RestoreVmFromSnapshot to roll back, then sends an :alert: Slack message linking back to the failing execution.vCenter scheduled tasks can snapshot a VM, but they cannot chain that snapshot to an SSH-driven OS upgrade, an HTTP readiness probe, a conditional rollback, and a Slack alert in one auditable run. Kestra wires those steps together with declarative YAML, retries on the health check, an errors branch for automatic recovery, and full execution lineage. You can trigger the flow from a cron schedule, a webhook from your patch-management system, or an upstream CVE event, then inspect every step from one UI.
pluginDefaults.server) and a VM in inventory.ops with passwordless sudo./health endpoint on the VM that returns 2xx when the workload is ready.io.kestra.plugin.ee.vmware plugin requires EE).VMWARE_VCENTER_USERNAME: vCenter user with snapshot and restore permission.VMWARE_VCENTER_PASSWORD: password for that vCenter user.SLACK_WEBHOOK: Slack Incoming Webhook URL for success and failure notifications.pluginDefaults.server to your vCenter FQDN.apply_patches to match your guest OS (apt-get for Debian/Ubuntu, dnf or yum for RHEL/CentOS/Rocky).vm_name and vm_address for a non-production VM first to validate the snapshot, reboot, and rollback paths.io.kestra.plugin.ansible.cli.AnsibleCLI to apply a hardened playbook.ForEach to patch a fleet sequentially or in parallel batches./health probe with multiple checks (TCP, application-level, database connectivity).