Editing snapshots
In this recipe, we are going to edit the XML definition of an existing snapshot and examine the changes.
Getting ready
For this recipe, we are going to need the following:
- A libvirt host with the QEMU toolset
- The snapshots we created in the Creating snapshots recipe
How to do it...
To edit a snapshot, run the following:
- List all available snapshots for the specified KVM instance:
root@kvm:~# virsh snapshot-list kvm1 Name Creation Time State ------------------------------------------------------------ 1492797458 2017-04-21 17:57:38 +0000 running kvm1_ext_snapshot 2017-04-21 18:08:49 +0000 disk-snapshot root@kvm:~#
- Edit the disk snapshot and change its name and description:
root@kvm:~# virsh snapshot-edit kvm1 --snapshotname kvm1_ext_snapshot --rename <domainsnapshot> <name>kvm1_ext_snapshot_renamed</name> <description>Disk only external snapshot for kvm1</description> ... root@kvm:~#
- List the snapshots...