[libvirt] [PATCH] sheepdog: allow snapshot

Peter Krempa pkrempa at redhat.com
Mon Nov 30 13:04:48 UTC 2015


On Mon, Nov 30, 2015 at 14:02:18 +0300, Vasiliy Tolstov wrote:
> 2015-11-30 13:45 GMT+03:00 Vasiliy Tolstov <v.tolstov at selfip.ru>:
> > In commit f7c1410b0ee5b878e81f2eddf86c609947a9b27c libvirt devs
> > disable creating snapshot with sheepdog storage and raw image format.
> > This patch allows creating snapshot (without --live flag for now)
> >
> > Vasiliy Tolstov (1):
> >   sheepdog: allow snapshot
> >
> >  src/qemu/qemu_driver.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> 
> 
> Next steps is to fix --live flag for snapshot, but i'm not understand message:
> live snapshot creation is supported only with external checkpoints

Checkpoint is a snapshot with ram.


> 
> i'm check the code
>     /* reject the VIR_DOMAIN_SNAPSHOT_CREATE_LIVE flag where not supported */
>     if (flags & VIR_DOMAIN_SNAPSHOT_CREATE_LIVE &&

So a combination of --live which means "do not pause the VM while taking
the snapshot" (yes it's documented).

>         (!virDomainObjIsActive(vm) ||

With an inactive machine ...

>          def->memory != VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL ||

or internal snapshot ... (since qemu pauses itself while taking the
snapshot)

>          redefine)) {

or snapshot redefinition doesn't make sense.

>         virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
>                        _("live snapshot creation is supported only "
>                          "with external checkpoints"));
>         goto cleanup;
>     }
> 
> and have a question:
> in case of sheepdog storage it allows to save memory (qemu have
> ability to create full vm snapshot with memory), but if domain have
> many disks (two sheepdog for example) how fix this code? And on which
> disk libvirt save the vm state?

If you are doing an internal snapshot, the code can't be changed.
Internal snapshots do no allow the CPUs to run while taking it.

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20151130/90360e8a/attachment-0001.sig>


More information about the libvir-list mailing list