Bug 1519002 - RFE: libvirt - improve support for external snapshots (merge, delete, virsh, etc)
Summary: RFE: libvirt - improve support for external snapshots (merge, delete, virsh, ...
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: beta
: ---
Assignee: Pavel Hrdina
QA Contact: Han Han
URL:
Whiteboard:
Depends On: 2173142 2174397 2174700 1402581 1519001 2170826
Blocks: 1214187 1342543 1403951 1431852 1621944 1997885 2132850
TreeView+ depends on / blocked
 
Reported: 2017-11-29 22:43 UTC by Ademar Reis
Modified: 2023-07-06 22:54 UTC (History)
34 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of: 1402581
Environment:
Last Closed:
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELBU-1675 0 None None None 2022-10-10 04:03:10 UTC
Red Hat Knowledge Base (Solution) 30379 0 None None None 2022-09-22 04:43:51 UTC

Internal Links: 1845924

Comment 5 Peter Krempa 2020-06-30 20:05:46 UTC
There are multiple options how to create an external snapshot:

1) using virsh snapshot-create-as (see man page for further explanation):

1.1) if the VM is active, but the user doesn't want to take a snapshot of the memory

  virsh snapshot-create-as $VMNAME --disk-only

1.2) if the vm is active and memory snapshot is required
 
  virsh snapshot-create-as $VMNAME --memspec file=/path/to/memory-image,snapshot=external

1.3) if disks which take part of the snapshot need to be controlled:

  virsh snapshot-create-as $VMNAME --memspec file=/path/to/memory-image,snapshot=external --diskspec vda,snapshot=no --diskspec vdb,file=/path/to/overlay-img

1.4) any additional options such as snapshot name, description etc can be controlled using additional parameters. Please refer to the man page:

https://libvirt.org/manpages/virsh.html#snapshot-create-as

2) using virsh snapshot create

This option requires an XML document describing the snapshot as argument. Please refer to the documentation.

For inspiration, a sample XML can be obtained using the '--print-xml' argument for 'virsh snapshot-create-as' which prints the XML the command generates.

snapshot XML documentation:

https://libvirt.org/formatsnapshot.html

Please note, that while creating external snapshots works, we don't yet have implementation for reverting or deleting external snapshots, thus internal snapshots must be supported until then.

Regarding customer's question, rhel-7.6 already supports external snapshots to the extent above.

If required there are manual steps which allow reversion or deletion of external snapshots.


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