diff --git a/docs/hooks.html.in b/docs/hooks.html.in
index 3503f8c2ad..eec7a6aaa0 100644
--- a/docs/hooks.html.in
+++ b/docs/hooks.html.in
@@ -100,11 +100,26 @@
- - When a QEMU guest is started, the qemu hook script is called as:
- /etc/libvirt/hooks/qemu guest_name start begin -
+ - Before a QEMU guest is started, the qemu hook script is
+ called in two locations; if either location fails, the guest
+ is not started. The first location, since
+ 0.9.0, is before libvirt performs any resource
+ labeling, and the hook can allocate resources not managed by
+ libvirt such as DRBD or missing bridges. This is called as:
+
/etc/libvirt/hooks/qemu guest_name prepare begin -
+ The second location, available Since
+ 0.8.0, occurs after libvirt has finished labeling
+ all resources, but has not yet started the guest, called as:
+ /etc/libvirt/hooks/qemu guest_name start begin -
- When a QEMU guest is stopped, the qemu hook script is called
- as:
- /etc/libvirt/hooks/qemu guest_name stopped end -
+ in two locations, to match the startup.
+ First, since 0.8.0, the hook is
+ called before libvirt restores any labels:
+
/etc/libvirt/hooks/qemu guest_name stopped end -
+ Then, after libvirt has released all resources, the hook is
+ called again, since 0.9.0, to allow
+ any additional resource cleanup:
+ /etc/libvirt/hooks/qemu guest_name release end -
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 76cceadc01..209c8cfb4d 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1928,7 +1928,7 @@ int qemuProcessStart(virConnectPtr conn,
vm->def->id = driver->nextvmid++;
- /* Run a early hook to set-up missing devices */
+ /* Run an early hook to set-up missing devices */
if (virHookPresent(VIR_HOOK_DRIVER_QEMU)) {
char *xml = virDomainDefFormat(vm->def, 0);
int hookret;
@@ -2436,7 +2436,7 @@ retry:
VIR_FREE(priv->vcpupids);
priv->nvcpupids = 0;
- /* The "release" hook cleans up additional ressources */
+ /* The "release" hook cleans up additional resources */
if (virHookPresent(VIR_HOOK_DRIVER_QEMU)) {
char *xml = virDomainDefFormat(vm->def, 0);