qemu hook is not starting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there!

Since our cloud system that is currently under development, might need it, I've tested libvirt
domain hooks but unfortunately failed. I've tried the following scenario:

1. create the hook directory...

# mkdir /etc/libvirt/hook
# chmod 755 /etc/libvirt/hook

2. ... or maybe hooks?

# ln -s hook hooks

3. create the hook script

# vi /etc/libvirt/hook/qemu
# cat /etc/libvirt/hook/qemu

#!/bin/bash
echo "*****************************************************" >> /tmp/libvirt.log
echo "qemu-hook: $@" >> /tmp/libvirt.log
echo "*****************************************************" >> /tmp/libvirt.log

echo "test error" >&2
exit 1

# chmod 755 /etc/libvirt/hook/qemu

4. Then I restarted the libvirt daemon and created a domain through virsh. Unfortunately nothing
happened. That is the vm started - although according to the documentation [1] it should not have
to start: "a non-zero return value from the script will abort the domain startup operation, and if
an error string is passed on stderr by the hook script, it will be provided back to the user
at the libvirt API level". Also the messages echod by the script did not appear in the log.


Could you please tell what I missed? What (else) should be done in order to run hooks?


Thanks in advance,
Gyula

---

[1] http://libvirt.org/hooks.html

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]