From 7d3b2eb58f23d387d0f5c9fe786f0f835605c22f Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Bosdonnat?= Date: Mon, 11 Jul 2016 13:55:53 +0200 Subject: [PATCH] libxl: add hooks support Introduce libxl hook and use it for start, prepare, started, stop, stopped, migrate events. --- docs/hooks.html.in | 53 +++++++++++++++++++++++++- src/libxl/libxl_domain.c | 74 +++++++++++++++++++++++++++++++++++++ src/libxl/libxl_driver.c | 22 +++++++++++ src/libxl/libxl_migration.c | 57 ++++++++++++++++++++++++++++ src/util/virhook.c | 16 +++++++- src/util/virhook.h | 13 +++++++ 6 files changed, 232 insertions(+), 3 deletions(-) diff --git a/docs/hooks.html.in b/docs/hooks.html.in index d4f4ac3dcf..11073cb782 100644 --- a/docs/hooks.html.in +++ b/docs/hooks.html.in @@ -17,8 +17,10 @@ (since 0.8.0)

  • A QEMU guest is started or stopped (since 0.8.0)

  • -
  • An LXC guest is started or stopped +
  • An LXC guest is started or stopped (since 0.8.0)

  • +
  • A libxl-handled Xen guest is started or stopped + (since 2.1.0)

  • A network is started or stopped or an interface is plugged/unplugged to/from the network (since 1.2.2)

  • @@ -41,7 +43,7 @@

    Script names

    -

    At present, there are three hook scripts that can be called:

    +

    At present, there are five hook scripts that can be called:

    +
    /etc/libvirt/hooks/libxl
    + +
    /etc/libvirt/hooks/network