Bug 817226 - [RFE] support domain offline --disk-only snapshots
[RFE] support domain offline --disk-only snapshots
Status: CLOSED CURRENTRELEASE
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Libvirt Maintainers
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-28 02:48 EDT by Alex Jia
Modified: 2016-04-26 10:02 EDT (History)
8 users (show)

See Also:
Fixed In Version: v1.0.1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-04-22 07:32:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alex Jia 2012-04-28 02:48:23 EDT
Description of problem:
Libvirt doesn't support domain offline --disk-only snapshots.

Version-Release number of selected component (if applicable):
# rpm -q libvirt qemu-kvm-rhev
libvirt-0.9.10-14.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.285.el6.x86_64


How reproducible:
alwasy

Steps to Reproduce:
# virsh domstate test
shut off

# virsh snapshot-create test --atomic --disk-only
error: unsupported configuration: disk snapshots of inactive domains not
implemented yet

  
Actual results:
"disk snapshots of inactive domains not implemented yet"

Expected results:
Support offline --disk-only snapshots.

Additional info:
Eric has help me confirm the issue.
Comment 1 Eric Blake 2012-05-23 13:44:40 EDT
This is on my personal pet-peeve list.  I definitely plan to fix this in time for 6.4, because it is not only frequently requested upstream, but because I can use it for making my other disk coding tasks easier.  The work is straightforward - if the domain is offline, wire up qemu-img to do the right things.
Comment 2 yisun 2015-04-22 05:47:00 EDT
is this a fixed bug?
Comment 3 Peter Krempa 2015-04-22 07:32:42 EDT
(In reply to yisun from comment #2)
> is this a fixed bug?

Indeed it is:

Upstream implemented this feature in:

commit 9b5a514b31f0a092cff5402e37d06d1c31f1b992
Author: Peter Krempa <pkrempa@redhat.com>
Date:   Mon Oct 15 17:35:24 2012 +0200

    snapshot: qemu: Add support for external inactive snapshots
    
    This patch adds support for external disk snapshots of inactive domains.
    The snapshot is created by calling using qemu-img by calling:
    
     qemu-img create -f format_of_snapshot -o
     backing_file=/path/to/src,backing_fmt=format_of_backing_image
     /path/to/snapshot
    
    in case the backing image format is known or probing is allowed and
    otherwise:
    
     qemu-img create -f format_of_snapshot -o  backing_file=/path/to/src
     /path/to/snapshot
    
    on each of the disks selected for snapshotting. This patch also modifies
    the snapshot preparing function to support creating external snapshots
    and to sanitize arguments. For now the user isn't able to mix external
    and internal snapshots but this restriction might be lifted in the
    future.

v1.0.0-46-g9b5a514

Note You need to log in before you can comment on or make changes to this bug.