[libvirt] [PATCH 13/20] snapshot: qemu: Add flag VIR_DOMAIN_SNAPSHOT_REVERT_STOPPED

Eric Blake eblake at redhat.com
Thu Nov 1 04:13:13 UTC 2012

On 10/23/2012 09:12 AM, Peter Krempa wrote:
> The current snapshot reverting api supported changing the state of the
> machine after the snapshot was reverted to either started or paused.
> This patch adds the ability to revert the state but to stopped state.
> ---
>  include/libvirt/libvirt.h.in | 1 +
>  src/libvirt.c                | 9 +++++----
>  tools/virsh-snapshot.c       | 3 +++
>  tools/virsh.pod              | 9 +++++----
>  4 files changed, 14 insertions(+), 8 deletions(-)

I haven't yet reviewed this thoroughly, but my initial scan through the
series found this issue:

>  Normally, reverting to a snapshot leaves the domain in the state it was
>  at the time the snapshot was created, except that a disk snapshot with
> -no vm state leaves the domain in an inactive state.  Passing either the
> -I<--running> or I<--paused> flag will perform additional state changes
> -(such as booting an inactive domain, or pausing a running domain).  Since
> +no vm state leaves the domain in an inactive state.  Passing one of the
> +I<--running>, I<--paused> or I<--stopped> flag will perform additional
> +state changes such as booting an inactive domain, pausing a running domain
> +or shutting the domain down after the snapshot is reverted.  Since
>  transient domains cannot be inactive, it is required to use one of these
>  flags when reverting to a disk snapshot of a transient domain.

Using --stopped with a transient domain must fail, so this last sentence
needs to be adjusted.

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: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121031/c367b913/attachment-0001.sig>

More information about the libvir-list mailing list