From: Dmitry Nesterenko Date: Tue, 23 Jun 2020 14:45:35 +0000 (+0300) Subject: docs: Document recent hook script extension X-Git-Tag: v6.5.0-rc1~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44699edb996e677dc326896621b0569dc9400199;p=thirdparty%2Flibvirt.git docs: Document recent hook script extension Signed-off-by: Dmitry Nesterenko Reviewed-by: Michal Privoznik --- diff --git a/docs/hooks.html.in b/docs/hooks.html.in index 7c9d3ef7f3..a38ba05522 100644 --- a/docs/hooks.html.in +++ b/docs/hooks.html.in @@ -36,6 +36,9 @@
  • If your installation of libvirt has instead been compiled from source, it is likely to be /usr/local/etc/libvirt/hooks/.
  • +
  • Since 6.5.0, you can also place several + hook scripts in the directories + /etc/libvirt/hooks/<driver>.d/.
  • To use hook scripts, you will need to create this hooks directory manually, place the desired hook scripts inside, then make @@ -59,6 +62,10 @@ Executed when a network is started or stopped or an interface is plugged/unplugged to/from the network +

    Since 6.5.0, you can also have + several scripts with any name in the directories + /etc/libvirt/hooks/<driver>.d/. They are + executed in alphabetical order after main script.


    Script structure

    @@ -191,6 +198,16 @@ script returns failure or the output XML is not valid, restore of the image will be aborted. This hook may be used, e.g., to change location of disk images for restored domains. +
  • Since 6.5.0, you can also place several + hook scripts in the directory + /etc/libvirt/hooks/qemu.d/. They are executed in + alphabetical order after main script. In this case each script also + acts as filter and can modify the domain XML and print it out on + its standart output. This script output is passed to standard input + next script in order. Empty output from any script is also identical + to copying the input XML without changing it. + In case any script returns failure common process will be aborted, + but all scripts from the directory will are executed.
  • Since 0.9.13, the qemu hook script is also called when the libvirtd daemon restarts and reconnects to previously running QEMU processes. If the script fails, the @@ -274,6 +291,16 @@ script returns failure or the output XML is not valid, incoming migration will be canceled. This hook may be used, e.g., to change location of disk images for incoming domains.
  • +
  • Since 6.5.0, you can also place several + hook scripts in the directory + /etc/libvirt/hooks/libxl.d/. They are executed in + alphabetical order after main script. In this case each script also + acts as filter and can modify the domain XML and print it out on + its standart output. This script output is passed to standard input + next script in order. Empty output from any script is also identical + to copying the input XML without changing it. + In case any script returns failure common process will be aborted, + but all scripts from the directory will are executed.
  • Since 2.1.0, the libxl hook script is also called when the libvirtd daemon restarts and reconnects to previously running Xen domains. If the script fails, the