[libvirt] suggestions on snapshotting testing

Eric Blake eblake at redhat.com
Thu May 17 17:30:35 UTC 2012


On 05/14/2012 11:26 PM, Kashyap Chamarthy wrote:
> Hi,
> 
> I'm willing to test/understand snapshotting in libivrt/qemu  in a much better way.  I can
> spend 10-ish  hours or so a week.
> 
> 
> I see a lot of work going on the snapshot front, upstream qemu/libvirt. I'm currently
> following/reading:
> ----------
> http://wiki.qemu.org/Features/SnapshotsMultipleDevices
> http://wiki.qemu.org/Features/LiveBlockMigration

This documents the lower-level commands exposed by qemu, but not
necessarily how libvirt uses them.

> http://wiki.libvirt.org/page/Snapshots

I made that page prior to integrating the code for live disk snapshots,
but have not maintained it since, so it might be a bit out of date with
how things have changed in the meantime, but hopefully still relatively
accurate.

> http://libvirt.org/formatsnapshot.html

That page is live based on libvirt.git, and should be up-to-date with
the current implementation; although I would welcome improvements for
additional things to mention.

> ------------
> 
> Am I going the right way?
> 
> Once I get a decent hang of things, I was wondering I could start writing some tests.
> 
> What do you advice?

Do you have specific scenarios in mind?  Propose a problem that you
think a snapshot would help, then ask questions on which APIs you would
use to solve that problem.

Do you understand the difference between the various snapshot flavors?
There's several orthogonal issues to be aware of, although not all
combinations are supported.

system checkpoint: VM state and disk state 'virsh snapshot-create'
disk only: just disk state 'virsh snapshot-create --disk-only'
VM state only: 'virsh save' - I'd really like to make this a special
case of 'virsh snapshot-create', but it needs more work

online: taken from a running VM
offline: taken from an offline VM
live: online, plus the additional guideline that the VM continues
running after the snapshot is taken, preferably with minimum downtime

internal: requires qcow2, qemu stores VM state and disk state inside the
qcow2 image, libvirt stores only an xml file tracking the state relation
(qemu 'savevm' command)
external: create a new file, possible for VM state (qemu 'migrate' to
file) and disks (qemu 'transaction:blockdev-snapshot-sync')

I'm sure additional tests would be welcome; perhaps libvirt-TCK would be
a good place to add such tests.  But I'm not quite sure what you plan to
do, or which aspects you plan to test, without more details; I'll try to
be responsive to any questions you have regarding specifics of any
sequence you are trying to do.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120517/796c437a/attachment-0001.sig>


More information about the libvir-list mailing list