Libvirt Hooks For Startup And Shutdown

Home » CentOS » Libvirt Hooks For Startup And Shutdown
CentOS 1 Comment

Hello list,

could anyone tell me where are the hooks for libvirt/qemu/kvm?

Read there:

I need the hooks for startup and stop at the CentOS architecture.

My version of libvirt:

One thought on - Libvirt Hooks For Startup And Shutdown

  • did you actually read it?

    The libvirt hook scripts are located in the directory

    * *In Linux distributions such as Fedora and RHEL, this is
    **|/etc/libvirt/hooks/|*. Other Linux distributions may do this
    * If your installation of libvirt has instead been compiled from
    source, it is likely to be |/usr/local/etc/libvirt/hooks/|.

    To use hook scripts, you will need to create this |hooks| directory manually, place the desired hook scripts inside, then make them executable.

    Script names

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

    * |/etc/libvirt/hooks/daemon|

    Executed when the libvirt daemon is started, stopped, or reloads its

    * |/etc/libvirt/hooks/qemu|

    Executed when a QEMU guest is started, stopped, or migrated

    * |/etc/libvirt/hooks/lxc|

    Executed when an LXC guest is started or stopped