VMware Trigger

VMware Trigger

Certified
Enterprise Edition

Trigger flows on vCenter VM events

Polls vCenter every 2 minutes for VM lifecycle events and emits matching ones. Supports filtering by VmEventType and a VM name regex; requires event-read permission.

yaml
type: io.kestra.plugin.ee.vmware.vcenter.Trigger

Trigger on VM power-off events from vCenter

yaml
id: vm_event_trigger
namespace: company.it

triggers:
  - id: watch
    type: io.kestra.plugin.ee.vmware.vcenter.Trigger
    interval: PT1M
    server: "vcenter.company.local"
    username: "{{ secret('VMWARE_VCENTER_USERNAME') }}"
    password: "{{ secret('VMWARE_VCENTER_PASSWORD') }}"
    eventTypes:
      - VM_POWERED_OFF
    vmNameRegex: "vm-.*"

tasks:
  - id: foreach_event
    type: io.kestra.plugin.core.flow.ForEach
    values: "{{ trigger.events }}"
    tasks:
      - id: log_vm_event
        type: io.kestra.plugin.core.log.Log
        message: "VM {{ fromJson(taskrun.value).vmName }} had event {{ fromJson(taskrun.value).eventType }} at {{ fromJson(taskrun.value).timestamp }}"
Properties
Possible Values
VM_SUSPENDEDVM_CREATEDVM_DEPLOYEDVM_CLONEVM_RENAMEDVM_FAILED_TO_POWER_ONVM_FAILED_TO_POWER_OFFVM_FAILED_TO_SUSPENDVM_FAILED_TO_RESETVM_REMOVEDVM_POWERED_ONVM_POWERED_OFF

Event type to monitor

Password

Server hostname or IP

FQDN or IP of the vCenter or ESXi endpoint (no scheme or port).

Username

e.g. Administrator@vsphere.local for vCenter or root for ESXi.

VM name regex

Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

DefaultPT2M
Formatduration

Interval between polling.

The interval between 2 different polls of schedule, this can avoid to overload the remote system with too many calls. For most of the triggers that depend on external systems, a minimal interval must be at least PT30S. See ISO_8601 Durations for more information of available interval values.

Default443

Server port

Defaults to 443.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Trust store path

Optional path to a PKCS12 trust store containing the CA certificate(s) used to validate the vCenter/ESXi server's TLS certificate. If omitted (or if the path does not exist), the JVM's default trust store (system CA certificates) is used instead. Certificate validation is always enforced; this plugin never disables TLS certificate validation.

Defaulttrue

A condition that determines whether the trigger should run.

A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.

List of events of a given type on a given VM

Definitions
eventTypestring
Possible Values
VM_SUSPENDEDVM_CREATEDVM_DEPLOYEDVM_CLONEVM_RENAMEDVM_FAILED_TO_POWER_ONVM_FAILED_TO_POWER_OFFVM_FAILED_TO_SUSPENDVM_FAILED_TO_RESETVM_REMOVEDVM_POWERED_ONVM_POWERED_OFF

Triggered VM event type

timestampstring

Event timestamp

vmNamestring

VM on which an event occurred.