qemu: hook: Provide hook when restoring a domain save image

This commit is contained in:
Peter Krempa
2014-09-17 11:38:39 +02:00
parent a552a86e1a
commit 4f3c2e39e5
4 changed files with 78 additions and 7 deletions

View File

@@ -177,6 +177,17 @@
script returns failure or the output XML is not valid, incoming
migration will be canceled. This hook may be used, e.g., to change
location of disk images for incoming domains.</li>
<li><span class="since">Since 1.2.9</span>, the qemu hook script is
also called when restoring a saved image either via the API or
automatically when restoring a managed save machine. It is called
as: <pre>/etc/libvirt/hooks/qemu guest_name restore begin -</pre>
with domain XML sent to standard input of the script. In this case,
the script acts as a filter and is supposed to modify the domain
XML and print it out on its standard output. Empty output is
identical to copying the input XML without changing it. In case the
script returns failure or the output XML is not valid, restore of the
image will be aborted. This hook may be used, e.g., to change
location of disk images for restored domains.</li>
<li><span class="since">Since 0.9.13</span>, the qemu hook script
is also called when the libvirtd daemon restarts and reconnects
to previously running QEMU processes. If the script fails, the