Libvirtd Hooks In CentOS 7

Home » CentOS » Libvirtd Hooks In CentOS 7
CentOS 1 Comment

I would like to create some libvirt hooks. This is so the hypervisor can execute some scripts during starting or stopping of a KVM guest. According to https://www.libvirt.org/hooks.html they must be present. However, it seems in CentOS 7 these hooks are gone in /etc/libvirt/

Libvirtversion: 1.2.8-16.el7_1.4
OS version: CentOS Linux release 7.1.1503 (Core)

Anyone how solved this riddle?

I already asked this question on CentOS.org/forums, but didn’t get much information apart from:
“Unfortunately I suspect that CentOS libvirt packages have hooks disabled. I was looking for the same thing (needed some hooks for live migration) but it didn’t work. However, after installing qemu from oVirt repository, hooks started working…”

Anybody has more information then this given answer?

One thought on - Libvirtd Hooks In CentOS 7

  • /etc/libvirt/hooks isn’t packaged, but I don’t see anything in the src.rpm that disables the hook code. If you create the directory and put hooks there, they should be called.