[libvirt] libvirt external disk-only snapshot will pause the VM?

Yuanzhen Gu yg185 at cs.rutgers.edu
Wed Aug 6 17:17:33 UTC 2014


On Wed, Aug 6, 2014 at 12:27 PM, Eric Blake <eblake at redhat.com> wrote:

> On 08/06/2014 10:06 AM, Yuanzhen Gu wrote:
> > yes, I got your point, thanks very much Eric.
>
> not entirely, because you still top-posted.
>
>     got it entirely this time, not top-posted.


> >
> > If I want to take a distributed snapshot, which need pause all the VMs
> and
> > then take snapshot, how can I control the pause for all the VMs?
>
> You mean, you have multiple VMs, and want to take a snapshot of all
> their storage at the same point in time?  Then it is up to you to
> manually pause all the guests before taking the snapshot in each of
> them.  Taking an external disk snapshot works while a guest is paused.
>

   I need take live snapshot for multiple VMs at the same time

>
> >
> > Is there only way that I turn to freeze/thaw functions?
>
> Guest freeze/thaw (virDomainFSFreeze) only works on a live guest.  So
> what you will have to do is:
>
> virDomainFSFreeze(vm1, ...)
> virDomainFSFreeze(vm2, ...)
> virDomainSuspend(vm1)
> virDomainSuspend(vm2)
> virDomainSnapshotCreateXML(vm1, ...)
> virDomainSnapshotCreateXML(vm2, ...)
> virDomainResume(vm1)
> virDomainResume(vm2)
> virDomainFSThaw(vm1, ...)
> virDOmainFSThaw(vm2, ...)
>

    I see, thanks.

>
> However, I honestly don't know why you think you need disk snapshots
> from the same point in time across multiple VMs, though.


   you suggested that external disk-only snapshot, libvirt will freeze/thaw
before/after taking snapshot


>  Compare it to
> bare metal - how would you take a snapshot of multiple hosts?  Either
> they are independent storage (and it doesn't matter if they are not
> precisely at the same point in time), or they are using clustered
> storage visible by all hosts in the cluster (but in that case, use your
> cluster storage management tools to take the snapshot, rather than
> trying to take a point-in-time snapshot of the low-level storage on each
> host and coordinating all the hosts to do it at the same point in time).
>

    good question.  I'll think about it clear my mind first and then answer
it, thanks!

>
> >
> > and freeze/thaw only for file systems, not for the whole guest, am I
> right?
>
> freeze/thaw is for all freezeable file systems on the whole guest, but
> it requires guest cooperation.
>
> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140806/3efe3a10/attachment-0001.htm>


More information about the libvir-list mailing list