<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 8, 2018 at 12:47 AM, Gianluca Cecchi <span dir="ltr">&lt;<a href="mailto:gianluca.cecchi@gmail.com" target="_blank">gianluca.cecchi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="gmail-"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 6, 2018 at 7:54 PM, Yaniv Kaul <span dir="ltr">&lt;<a href="mailto:ykaul@redhat.com" target="_blank">ykaul@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><span><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Mar 6, 2018 7:02 PM, &quot;Gianluca Cecchi&quot; &lt;<a href="mailto:gianluca.cecchi@gmail.com" target="_blank">gianluca.cecchi@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail-m_-8815610689455994333gmail-m_4821298033173848120m_5620251741923677503quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello,</div><div>this thread last year (started by me... ;-) was very useful in different aspects involved</div><div><br></div><a href="http://lists.ovirt.org/pipermail/users/2017-March/080322.html" target="_blank">http://lists.ovirt.org/piperma<wbr>il/users/2017-March/080322.htm<wbr>l</a><br><div><br></div><div>We did cover memory save or not and fsfreeze automatically done by guest agent if installed inside the VM.</div><div>What about pre-snapshot scripts/operations to run inside guest, to have application consistency?</div><div>Eg if I have a database inside the VM and I have scripted my backup job involving live-snapshot (eg with the backup.py utility of the thread)  </div></div></blockquote></div></div></div><div dir="auto"><br></div></span><div dir="auto"><a href="https://github.com/guillon/qemu-plugins/blob/master/scripts/qemu-guest-agent/fsfreeze-hook.d/mysql-flush.sh.sample" target="_blank">https://github.com/guillon/qem<wbr>u-plugins/blob/master/scripts/<wbr>qemu-guest-agent/fsfreeze-hook<wbr>.d/mysql-flush.sh.sample</a><br></div><div dir="auto"><br></div><br></div></blockquote></div><br></div></span><div class="gmail_extra">Hello Yaniv,<br></div><div class="gmail_extra">thanks for the information and the example file link.<br></div><div class="gmail_extra">So I have understood that the freeze-hook script is run with the &quot;freeze&quot; option before snapshot and again but with the &quot;thaw&quot; option after the snapshot.<br></div><div class="gmail_extra">So I can manage what to do, parsing the argument given</div><div class="gmail_extra">So far so good.<br></div><div class="gmail_extra">I have tested with a Fedora 27 guest and all is ok there.<br><br></div><div class="gmail_extra">Now I would like to do something similar for a Windows 2008 R2 x64 VM.<br></div></div></blockquote><div><br></div><div>Windows is somewhat different. In fact, it&#39;s a bit better than Linux (ARGH! but it&#39;s true) with its support for VSS - an API for applications to register to events such as backup.</div><div>You should have the QEMU guest agent VSS provider installed (Note: need to see where&#39;s the latest bits - I found[1]).</div><div><br></div><div>Then, if your application supports VSS, you are all good (I believe).</div><div>Y.</div><div><br></div><div>[1] <a href="https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-qemu-ga/qemu-ga-win-7.4.5-1/">https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-qemu-ga/qemu-ga-win-7.4.5-1/</a></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"></div><div class="gmail_extra">I see that the qemu-guest-agent has been installed under C:\Programs\qemu-ga and that the &quot;QEMU Guest Agent&quot; service is run as<br></div><div class="gmail_extra">&quot;C:\Program Files\qemu-ga\qemu-ga.exe&quot; -d<br><br></div><div class="gmail_extra">In fact I see I have a registry key in<br><br></div><div class="gmail_extra">HKLM\SYSTEM\CurrentControlSet\<wbr>services\QEMU-GA<br><br></div><div class="gmail_extra">with the same value above for ImagePath ;<br>&quot;C:\Program Files\qemu-ga\qemu-ga.exe&quot; -d<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">What should I do to enable a freeze-hook script on Windows now?<br><br></div><div class="gmail_extra">BTW: searching around while trying to understand more, I found that:<br><br></div><div class="gmail_extra">on hypervisor running the VM I have<br><br></div><div class="gmail_extra"># vdsClient -s 0 getVmStats vm_guid<br><br></div><div class="gmail_extra">that works and gives me information that confirms agent seems to communicate and I get also<br></div><div class="gmail_extra">appsList = [.... , &#39;QEMU guest agent&#39;, ...]<br><br>Also, the dump of the dynamic xml for the guest contains</div><div class="gmail_extra"><br><div class="gmail_extra"># virsh -r dumpxml VM_NAME</div><div class="gmail_extra"><br></div><div class="gmail_extra">    &lt;channel type=&#39;unix&#39;&gt;</div><div class="gmail_extra">      &lt;source mode=&#39;bind&#39; path=&#39;/var/lib/libvirt/qemu/<wbr>channels/420e5014-9b26-a4c0-<wbr>9d79-ed9b123304de.org.qemu.<wbr>guest_agent.0&#39;/&gt;</div><div class="gmail_extra">      &lt;target type=&#39;virtio&#39; name=&#39;org.qemu.guest_agent.0&#39; state=&#39;connected&#39;/&gt;</div><div class="gmail_extra">      &lt;alias name=&#39;channel1&#39;/&gt;</div><div class="gmail_extra">      &lt;address type=&#39;virtio-serial&#39; controller=&#39;0&#39; bus=&#39;0&#39; port=&#39;2&#39;/&gt;</div><div class="gmail_extra">    &lt;/channel&gt;</div><div><br></div><div>I tried to get its settings from qemu guest agent using socat and unix domain sockets but I don&#39;t receive answer</div><div><br></div><div><div># socat unix-connect:/<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">var/lib/libvirt/<wbr>qemu/channels/420e5014-9b26-<wbr><a href="http://a4c0-9d79-ed9b123304de.org">a4c0-9d79-ed9b123304de.org</a>.<wbr>qemu.guest_agent.0</span> readline</div><div><br></div><div>and then in the interactive prompt</div><div><br></div><div>{&quot;execute&quot;:&quot;guest-info&quot;}</div></div><div><br></div><div>to get and verify information about fsfreeze, something like </div><div>...., {&quot;enabled&quot;: true, &quot;name&quot;: &quot;guest-fsfreeze-freeze&quot;}, ... <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">...., {&quot;enabled&quot;: true, &quot;name&quot;: &quot;guest-fsfreeze-thaw&quot;}, ...</span></div><div> </div><div>But I didn&#39;t get any line....</div><div>Is this communication from OS disabled by design out of oVirt mgmt?</div><div><br></div><div>Thanks again for any info to configure freeze-hook in Windows guest.</div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div><div>Gianluca</div><div><br></div><div><br></div><div><br></div></font></span></div><div class="gmail_extra"><br></div></div>
</blockquote></div><br></div></div>