<div dir="ltr"><br><div class="gmail_extra"><br clear="all"><div><div dir="ltr"> </div></div>
<br><br><div class="gmail_quote">On Wed, Aug 6, 2014 at 12:27 PM, Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="">On 08/06/2014 10:06 AM, Yuanzhen Gu wrote:<br>
> yes, I got your point, thanks very much Eric.<br>
<br>
</div>not entirely, because you still top-posted.<br>
<div class=""><br></div></blockquote><div>    got it entirely this time, not top-posted. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">


><br>
> If I want to take a distributed snapshot, which need pause all the VMs and<br>
> then take snapshot, how can I control the pause for all the VMs?<br>
<br>
</div>You mean, you have multiple VMs, and want to take a snapshot of all<br>
their storage at the same point in time?  Then it is up to you to<br>
manually pause all the guests before taking the snapshot in each of<br>
them.  Taking an external disk snapshot works while a guest is paused.<br></blockquote><div><br></div><div>   I need take live snapshot for multiple VMs at the same time </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div class=""><br>
><br>
> Is there only way that I turn to freeze/thaw functions?<br>
<br>
</div>Guest freeze/thaw (virDomainFSFreeze) only works on a live guest.  So<br>
what you will have to do is:<br>
<br>
virDomainFSFreeze(vm1, ...)<br>
virDomainFSFreeze(vm2, ...)<br>
virDomainSuspend(vm1)<br>
virDomainSuspend(vm2)<br>
virDomainSnapshotCreateXML(vm1, ...)<br>
virDomainSnapshotCreateXML(vm2, ...)<br>
virDomainResume(vm1)<br>
virDomainResume(vm2)<br>
virDomainFSThaw(vm1, ...)<br>
virDOmainFSThaw(vm2, ...)<br></blockquote><div><br></div><div>    I see, thanks. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
However, I honestly don't know why you think you need disk snapshots<br>
from the same point in time across multiple VMs, though. </blockquote><div><br></div><div>   you suggested that external disk-only snapshot, libvirt will freeze/thaw before/after taking snapshot</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 Compare it to<br>
bare metal - how would you take a snapshot of multiple hosts?  Either<br>
they are independent storage (and it doesn't matter if they are not<br>
precisely at the same point in time), or they are using clustered<br>
storage visible by all hosts in the cluster (but in that case, use your<br>
cluster storage management tools to take the snapshot, rather than<br>
trying to take a point-in-time snapshot of the low-level storage on each<br>
host and coordinating all the hosts to do it at the same point in time).<br></blockquote><div><br></div><div>    good question.  I'll think about it clear my mind first and then answer it, thanks! </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div class=""><br>
><br>
> and freeze/thaw only for file systems, not for the whole guest, am I right?<br>
<br>
</div>freeze/thaw is for all freezeable file systems on the whole guest, but<br>
it requires guest cooperation.<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Eric Blake   eblake redhat com    <a href="tel:%2B1-919-301-3266" value="+19193013266">+1-919-301-3266</a><br>
Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
<br>
</div></div></blockquote></div><br></div></div>