
KVM / Libvirt VmEventTrigger
CertifiedPoll KVM domain state
KVM / Libvirt VmEventTrigger
Poll KVM domain state
Polling trigger that connects to libvirt on the given URI, reads a domain's state on each interval, and emits an execution with the name and current state. Logs and skips when lookup fails.
type: io.kestra.plugin.kvm.VmEventTriggerExamples
id: monitor_kvm_vm
namespace: kvmtest.ssh
tasks:
- id: alert
type: io.kestra.plugin.core.log.Log
message: |
Name: {{ render(trigger.name | json) }}
State: {{ render(trigger.state | json) }}
triggers:
- id: watch_vm
type: io.kestra.plugin.kvm.VmEventTrigger
uri: qemu+ssh://root@167.99.104.163/system
name: kestra-worker-nodes
interval: PT1M
Properties
name *string
Domain name
Name of the libvirt domain to monitor.
allowConcurrent boolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
interval string
PT1MdurationPoll interval
Time between state checks. Default PT1M.
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
uri string
Libvirt URI
Connection URI rendered before use; required to reach the hypervisor.
when string
trueA 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.
Outputs
name string
VM Name
Monitored domain name.
state string
VM State
Libvirt domain state at the time of polling.