aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-03-23 14:50:29 -0600
committerEric Blake <eblake@redhat.com>2011-03-28 09:51:04 -0600
commitef701fd8cb12d7db69271bf852b54f2d4c7a1055 (patch)
tree76667c55e5a5d59704e917271866384377be8cbf /docs/hooks.html.in
parentqemu: don't restore state label twice (diff)
downloadlibvirt-ef701fd8cb12d7db69271bf852b54f2d4c7a1055.tar.gz
libvirt-ef701fd8cb12d7db69271bf852b54f2d4c7a1055.tar.bz2
libvirt-ef701fd8cb12d7db69271bf852b54f2d4c7a1055.zip
docs: document recent hook additions
* src/qemu/qemu_process.c (qemuProcessStart, qemuProcessStop): Fix typos. * docs/hooks.html.in: Document 'prepare' and 'release' hooks.
Diffstat (limited to 'docs/hooks.html.in')
-rw-r--r--docs/hooks.html.in23
1 files changed, 19 insertions, 4 deletions
diff --git a/docs/hooks.html.in b/docs/hooks.html.in
index 3503f8c2a..eec7a6aaa 100644
--- a/docs/hooks.html.in
+++ b/docs/hooks.html.in
@@ -100,11 +100,26 @@
<h5><a name="qemu">/etc/libvirt/hooks/qemu</a></h5>
<ul>
- <li>When a QEMU guest is started, the qemu hook script is called as:<br/>
- <pre>/etc/libvirt/hooks/qemu guest_name start begin -</pre></li>
+ <li>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, <span class="since">since
+ 0.9.0</span>, 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:</br>
+ <pre>/etc/libvirt/hooks/qemu guest_name prepare begin -</pre>
+ The second location, available <span class="since">Since
+ 0.8.0</span>, occurs after libvirt has finished labeling
+ all resources, but has not yet started the guest, called as:</br>
+ <pre>/etc/libvirt/hooks/qemu guest_name start begin -</pre></li>
<li>When a QEMU guest is stopped, the qemu hook script is called
- as:<br/>
- <pre>/etc/libvirt/hooks/qemu guest_name stopped end -</pre></li>
+ in two locations, to match the startup.
+ First, <span class="since">since 0.8.0</span>, the hook is
+ called before libvirt restores any labels:</br>
+ <pre>/etc/libvirt/hooks/qemu guest_name stopped end -</pre>
+ Then, after libvirt has released all resources, the hook is
+ called again, <span class="since">since 0.9.0</span>, to allow
+ any additional resource cleanup:<br/>
+ <pre>/etc/libvirt/hooks/qemu guest_name release end -</pre></li>
</ul>
<h5><a name="lxc">/etc/libvirt/hooks/lxc</a></h5>