On 10/09/2012 07:39 AM, Peter Krempa wrote: > The default behavior while creating external checkpoints is to let the > guest run while the memory state is caputred. This leads to a larger s/caputred/captured/ > save file but minimizes the time needed to take the checkpoint. I'd rather swap the defaults. After all, virDomainMigrate and virDomainCoreDump default to offline, and require a _LIVE flag to force live saves, as live is trickier to implement and might not converge, so it is not a good default. > > This patch adds a flag that causes the guest to be paused before taking > the snapshot. > *include/libvirt/libvirt.h.in: > - add new paused reason: VIR_DOMAIN_PAUSED_SNAPSHOT > - add new flag for takin snapshot: VIR_DOMAIN_SNAPSHOT_CREATE_PAUSE > *tools/virsh-domain-monitor.c: > - add string representation for VIR_DOMAIN_PAUSED_SNAPSHOT > *tools/virsh-snapshot.c: > - add support for VIR_DOMAIN_SNAPSHOT_CREATE_PAUSE > *tools/virsh.pod: > - add docs for --pause option added to use > VIR_DOMAIN_SNAPSHOT_CREATE_PAUSE flag You'll therefore need to rework this patch into selecting VIR_DOMAIN_SNAPSHOT_CREATE_LIVE with opposite semantics, and default to paused. > --- > include/libvirt/libvirt.h.in | 4 ++++ > tools/virsh-domain-monitor.c | 2 ++ > tools/virsh-snapshot.c | 6 ++++++ > tools/virsh.pod | 12 ++++++++++-- > 4 files changed, 22 insertions(+), 2 deletions(-) > > diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in > index 81f12a4..376d6d5 100644 > --- a/include/libvirt/libvirt.h.in > +++ b/include/libvirt/libvirt.h.in > @@ -179,6 +179,7 @@ typedef enum { > VIR_DOMAIN_PAUSED_WATCHDOG = 6, /* paused due to a watchdog event */ > VIR_DOMAIN_PAUSED_FROM_SNAPSHOT = 7, /* paused after restoring from snapshot */ > VIR_DOMAIN_PAUSED_SHUTTING_DOWN = 8, /* paused during shutdown process */ > + VIR_DOMAIN_PAUSED_SNAPSHOT = 9, /* paused while creating a snaphot */ Eep - VIR_DOMAIN_PAUSED_FROM_SNAPSHOT and VIR_DOMAIN_PAUSED_SNAPSHOT - do we really need two values? I'd rather you just reuse the existing value. -- Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list