101
101
<h5><a name="qemu">/etc/libvirt/hooks/qemu</a></h5>
103
<li>When a QEMU guest is started, the qemu hook script is called as:<br/>
104
<pre>/etc/libvirt/hooks/qemu guest_name start begin -</pre></li>
103
<li>Before a QEMU guest is started, the qemu hook script is
104
called in two locations; if either location fails, the guest
105
is not started. The first location, <span class="since">since
106
0.9.0</span>, is before libvirt performs any resource
107
labeling, and the hook can allocate resources not managed by
108
libvirt such as DRBD or missing bridges. This is called as:<br/>
109
<pre>/etc/libvirt/hooks/qemu guest_name prepare begin -</pre>
110
The second location, available <span class="since">Since
111
0.8.0</span>, occurs after libvirt has finished labeling
112
all resources, but has not yet started the guest, called as:<br/>
113
<pre>/etc/libvirt/hooks/qemu guest_name start begin -</pre></li>
105
114
<li>When a QEMU guest is stopped, the qemu hook script is called
107
<pre>/etc/libvirt/hooks/qemu guest_name stopped end -</pre></li>
115
in two locations, to match the startup.
116
First, <span class="since">since 0.8.0</span>, the hook is
117
called before libvirt restores any labels:<br/>
118
<pre>/etc/libvirt/hooks/qemu guest_name stopped end -</pre>
119
Then, after libvirt has released all resources, the hook is
120
called again, <span class="since">since 0.9.0</span>, to allow
121
any additional resource cleanup:<br/>
122
<pre>/etc/libvirt/hooks/qemu guest_name release end -</pre></li>
110
125
<h5><a name="lxc">/etc/libvirt/hooks/lxc</a></h5>