Hooks for specific system management

Libvirt includes synchronous hooks, starting from version 0.8.0, as a way to tie in specific tailored system actions at a specific time. If these scripts are present on the host where the hypervisor is running, then they are called when the libvirt daemon is doingi some significant action.

The scripts are expected to execute quickly, return a zero exit status if all conditions are set for the daemon to continue the action (non zero will be considered a failure which may be ignored but in general will stop the ongoing operation). The script also should not call back into libvirt as the daemon is waiting for the script exit and deadlock is likely to occur.

The scripts are stored in the directory /etc/libvirt/hooks/ when using a standard installation path ($SYSCONF_DIR/libvirt/hooks/ in general).

Each script is given the following command line arguments:

There are currently scripts for 3 domains of operation: