Bug 817226 - [RFE] support domain offline --disk-only snapshots
Summary: [RFE] support domain offline --disk-only snapshots
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-28 06:48 UTC by Alex Jia
Modified: 2016-04-26 14:02 UTC (History)
8 users (show)

Fixed In Version: v1.0.1
Clone Of:
Environment:
Last Closed: 2015-04-22 11:32:42 UTC
Embargoed:


Attachments (Terms of Use)

Description Alex Jia 2012-04-28 06:48:23 UTC
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 17:44:40 UTC
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 09:47:00 UTC
is this a fixed bug?

Comment 3 Peter Krempa 2015-04-22 11:32:42 UTC
(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>
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.