Check VMs on a KVM host using
virsh list. Needs sudo.
The state field lists what state each domain (a VM) is currently in. A domain can be in one of the following possible states:
runningThe domain is currently running on a CPU.
idleThe domain is idle, and not running or runnable. This can be caused because the domain is waiting on IO (a traditional wait state) or has gone to sleep because there was nothing else for it to do.
pausedThe domain has been paused, usually occurring through the administrator running
virsh suspend. When in a paused state the domain will still consume allocated resources like memory, but will not be eligible for scheduling by the hypervisor.
in shutdownThe domain is in the process of shutting down, i.e. the guest operating system has been notified and should be in the process of stopping its operations gracefully.
shut offThe domain is not running. Usually this indicates the domain has been shut down completely, or has not been started.
crashedThe domain has crashed, which is always a violent ending. Usually this state can only occur if the domain has been configured not to „restart on crash“ (in the guest OS).
pmsuspendedThe domain has been suspended by guest power management, e.g. entered into s3 state.
Check Plugin Download
Check Interval Recommendation
Every 15 minutes
Can be called without parameters
usage: kvm-vm [-h] [-V] [--always-ok] Check VMs on a KVM host using "virsh list". optional arguments: -h, --help show this help message and exit -V, --version show program's version number and exit --always-ok Always returns OK.
VMs: 1 running, 15 shut_off
CRIT if any VM is crashed.
WARN if any VM is in state idle, paused or pmsuspended.
Otherwise OK (even if no VM is running at all).
Perfdata / Metrics