<div dir="ltr"><br><div class="gmail_extra"><br clear="all"><div><div dir="ltr"> </div></div><br><div class="gmail_quote">On Wed, Aug 6, 2014 at 1:23 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 11:17 AM, Yuanzhen Gu wrote:<br>
<br>
>> 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>
>><br>
><br>
>     I see, thanks.<br>
><br>
>><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.<br>
><br>
><br>
>    you suggested that external disk-only snapshot, libvirt will freeze/thaw<br>
> before/after taking snapshot<br>
<br>
</div>For a single guest, yes, libvirt can handle both the freeze/thaw and any<br>
necessary pause/resume of the guest automatically.  But as soon as you<br>
are coordinating multiple guests, it is up to you do to the<br>
coordination.  Libvirt handles the case of taking a snapshot when the<br>
guest is already frozen and paused, but the burden of doing the three<br>
steps in parallel across VMs is now up to you instead of all three steps<br>
in a single API call for one VM.<br></blockquote><div><br></div><div>    I see, thanks Eric. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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>