[libvirt-users] snapshot anomaly

I'm not sure how this snapshot got created, but, I cannot delete it, and its presence prevents me from creating other snapshots. I don't know if it was created by a command gone amok or something else. # virsh snapshot-list serv1r2 Name Creation Time State ------------------------------------------------------------ snap 2017-01-30 17:01:11 -0500 shutoff # virsh snapshot-delete serv1r2 snap --disk-only error: command 'snapshot-delete' doesn't support option --disk-only # virsh snapshot-dumpxml serv1r2 snap <domainsnapshot> <name>snap</name> <state>shutoff</state> <creationTime>1485813671</creationTime> <memory snapshot='no'/> <disks> <disk name='vda' snapshot='external' type='file'> <driver type='qcow2'/> <source file='/*var/lib/libvirt/images/serv1r2-savesnap.qcow2'/*> </disk> <disk name='fda' snapshot='no'/> <disk name='hda' snapshot='no'/> </disks> # ls -l /var/lib/libvirt/images/serv1r2-savesnap.qcow2 ls: cannot access /var/lib/libvirt/images/serv1r2-savesnap.qcow2: No such file or directory # virsh snapshot-create-as --domain serv1r2 snap --diskspec vda,file=/var/lib/libvirt/flashimages/serv1r2-snap.qcow2 --disk-only --atomic --no-metadata --quiesce error: internal error: unexpected domain snapshot snap already exists # virsh snapshot-revert serv1r2 snap error: unsupported configuration: revert to external snapshot not supported yet Any idea for breaking out of this box? -- Doug Hughes Keystone NAP Fairless Hills, PA 1.844.KEYBLOCK (539.2562)

Hi, Can you try this command: virsh snapshot-delete serv1r2 snap --metadata On Wed, Aug 23, 2017 at 4:41 PM, Doug Hughes <doug.hughes@keystonenap.com> wrote:
I'm not sure how this snapshot got created, but, I cannot delete it, and its presence prevents me from creating other snapshots. I don't know if it was created by a command gone amok or something else.
# virsh snapshot-list serv1r2 Name Creation Time State ------------------------------------------------------------ snap 2017-01-30 17:01:11 -0500 shutoff
# virsh snapshot-delete serv1r2 snap --disk-only error: command 'snapshot-delete' doesn't support option --disk-only
# virsh snapshot-dumpxml serv1r2 snap <domainsnapshot> <name>snap</name> <state>shutoff</state> <creationTime>1485813671</creationTime> <memory snapshot='no'/> <disks> <disk name='vda' snapshot='external' type='file'> <driver type='qcow2'/> <source file='/*var/lib/libvirt/images/serv1r2-savesnap.qcow2'/*> </disk> <disk name='fda' snapshot='no'/> <disk name='hda' snapshot='no'/> </disks>
# ls -l /var/lib/libvirt/images/serv1r2-savesnap.qcow2 ls: cannot access /var/lib/libvirt/images/serv1r2-savesnap.qcow2: No such file or directory
# virsh snapshot-create-as --domain serv1r2 snap --diskspec vda,file=/var/lib/libvirt/flashimages/serv1r2-snap.qcow2 --disk-only --atomic --no-metadata --quiesce error: internal error: unexpected domain snapshot snap already exists
# virsh snapshot-revert serv1r2 snap error: unsupported configuration: revert to external snapshot not supported yet
Any idea for breaking out of this box?
-- Doug Hughes Keystone NAP Fairless Hills, PA 1.844.KEYBLOCK (539.2562)
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
-- Regards, Sakhi Hadebe Engineer: South African National Research Network (SANReN)Competency Area, Meraka, CSIR Tel: +27 12 841 2308 <+27128414213> Fax: +27 12 841 4223 <+27128414223> Cell: +27 71 331 9622 <+27823034657> Email: sakhi@sanren.ac.za <shadebe@csir.co.za>

THat did it! Can you esplain what was going on and how that fixed it? Thanks On 8/23/2017 10:50 AM, Sakhi Hadebe wrote:
Hi,
Can you try this command: virsh snapshot-delete serv1r2 snap --metadata
On Wed, Aug 23, 2017 at 4:41 PM, Doug Hughes <doug.hughes@keystonenap.com <mailto:doug.hughes@keystonenap.com>> wrote:
I'm not sure how this snapshot got created, but, I cannot delete it, and its presence prevents me from creating other snapshots. I don't know if it was created by a command gone amok or something else.
# virsh snapshot-list serv1r2 Name Creation Time State ------------------------------------------------------------ snap 2017-01-30 17:01:11 -0500 shutoff
# virsh snapshot-delete serv1r2 snap --disk-only error: command 'snapshot-delete' doesn't support option --disk-only
# virsh snapshot-dumpxml serv1r2 snap <domainsnapshot> <name>snap</name> <state>shutoff</state> <creationTime>1485813671</creationTime> <memory snapshot='no'/> <disks> <disk name='vda' snapshot='external' type='file'> <driver type='qcow2'/> <source file='/*var/lib/libvirt/images/serv1r2-savesnap.qcow2'/*> </disk> <disk name='fda' snapshot='no'/> <disk name='hda' snapshot='no'/> </disks>
# ls -l /var/lib/libvirt/images/serv1r2-savesnap.qcow2 ls: cannot access /var/lib/libvirt/images/serv1r2-savesnap.qcow2: No such file or directory
# virsh snapshot-create-as --domain serv1r2 snap --diskspec vda,file=/var/lib/libvirt/flashimages/serv1r2-snap.qcow2 --disk-only --atomic --no-metadata --quiesce error: internal error: unexpected domain snapshot snap already exists
# virsh snapshot-revert serv1r2 snap error: unsupported configuration: revert to external snapshot not supported yet
Any idea for breaking out of this box?
-- Doug Hughes Keystone NAP Fairless Hills, PA 1.844.KEYBLOCK (539.2562)
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com <mailto:libvirt-users@redhat.com> https://www.redhat.com/mailman/listinfo/libvirt-users <https://www.redhat.com/mailman/listinfo/libvirt-users>
-- Regards, Sakhi Hadebe Engineer: South African National Research Network (SANReN)Competency Area, Meraka, CSIR Tel: +27 12 841 2308 <tel:+27128414213> Fax: +27 12 841 4223 <tel:+27128414223> Cell: +27 71 331 9622 <tel:+27823034657> Email: sakhi@sanren.ac.za <mailto:shadebe@csir.co.za>
-- Doug Hughes Keystone NAP Fairless Hills, PA 1.844.KEYBLOCK (539.2562)

I had the same problem yesterday. I found the solution from this article https://kashyapc.fedorapeople.org/virt/lc-2012/snapshots-handout.html. According to the article it deletes the tracking metadata by libvirt. You can physically remove the snapshot now that there is no tracking stream data by libvirt On Wed, Aug 23, 2017 at 4:56 PM, Doug Hughes <doug.hughes@keystonenap.com> wrote:
THat did it! Can you esplain what was going on and how that fixed it? Thanks
On 8/23/2017 10:50 AM, Sakhi Hadebe wrote:
Hi,
Can you try this command: virsh snapshot-delete serv1r2 snap --metadata
On Wed, Aug 23, 2017 at 4:41 PM, Doug Hughes <doug.hughes@keystonenap.com> wrote:
I'm not sure how this snapshot got created, but, I cannot delete it, and its presence prevents me from creating other snapshots. I don't know if it was created by a command gone amok or something else.
# virsh snapshot-list serv1r2 Name Creation Time State ------------------------------------------------------------ snap 2017-01-30 17:01:11 -0500 shutoff
# virsh snapshot-delete serv1r2 snap --disk-only error: command 'snapshot-delete' doesn't support option --disk-only
# virsh snapshot-dumpxml serv1r2 snap <domainsnapshot> <name>snap</name> <state>shutoff</state> <creationTime>1485813671</creationTime> <memory snapshot='no'/> <disks> <disk name='vda' snapshot='external' type='file'> <driver type='qcow2'/> <source file='/*var/lib/libvirt/images/serv1r2-savesnap.qcow2'/*> </disk> <disk name='fda' snapshot='no'/> <disk name='hda' snapshot='no'/> </disks>
# ls -l /var/lib/libvirt/images/serv1r2-savesnap.qcow2 ls: cannot access /var/lib/libvirt/images/serv1r2-savesnap.qcow2: No such file or directory
# virsh snapshot-create-as --domain serv1r2 snap --diskspec vda,file=/var/lib/libvirt/flashimages/serv1r2-snap.qcow2 --disk-only --atomic --no-metadata --quiesce error: internal error: unexpected domain snapshot snap already exists
# virsh snapshot-revert serv1r2 snap error: unsupported configuration: revert to external snapshot not supported yet
Any idea for breaking out of this box?
-- Doug Hughes Keystone NAP Fairless Hills, PA 1.844.KEYBLOCK (539.2562)
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
-- Regards, Sakhi Hadebe
Engineer: South African National Research Network (SANReN)Competency Area, Meraka, CSIR
Tel: +27 12 841 2308 <+27128414213> Fax: +27 12 841 4223 <+27128414223> Cell: +27 71 331 9622 <+27823034657> Email: sakhi@sanren.ac.za <shadebe@csir.co.za>
-- Doug Hughes Keystone NAP Fairless Hills, PA 1.844.KEYBLOCK (539.2562)
-- Regards, Sakhi Hadebe Engineer: South African National Research Network (SANReN)Competency Area, Meraka, CSIR Tel: +27 12 841 2308 <+27128414213> Fax: +27 12 841 4223 <+27128414223> Cell: +27 71 331 9622 <+27823034657> Email: sakhi@sanren.ac.za <shadebe@csir.co.za>

Oddly, the physical file did not exist. I'm not sure it ever did? (no proof one way or another on that) On 8/23/2017 11:09 AM, Sakhi Hadebe wrote:
I had the same problem yesterday. I found the solution from this article https://kashyapc.fedorapeople.org/virt/lc-2012/snapshots-handout.html. According to the article it deletes the tracking metadata by libvirt.
You can physically remove the snapshot now that there is no tracking stream data by libvirt
On Wed, Aug 23, 2017 at 4:56 PM, Doug Hughes <doug.hughes@keystonenap.com <mailto:doug.hughes@keystonenap.com>> wrote:
THat did it! Can you esplain what was going on and how that fixed it? Thanks
On 8/23/2017 10:50 AM, Sakhi Hadebe wrote:
Hi,
Can you try this command: virsh snapshot-delete serv1r2 snap --metadata
On Wed, Aug 23, 2017 at 4:41 PM, Doug Hughes <doug.hughes@keystonenap.com <mailto:doug.hughes@keystonenap.com>> wrote:
I'm not sure how this snapshot got created, but, I cannot delete it, and its presence prevents me from creating other snapshots. I don't know if it was created by a command gone amok or something else.
# virsh snapshot-list serv1r2 Name Creation Time State ------------------------------------------------------------ snap 2017-01-30 17:01:11 -0500 shutoff
# virsh snapshot-delete serv1r2 snap --disk-only error: command 'snapshot-delete' doesn't support option --disk-only
# virsh snapshot-dumpxml serv1r2 snap <domainsnapshot> <name>snap</name> <state>shutoff</state> <creationTime>1485813671</creationTime> <memory snapshot='no'/> <disks> <disk name='vda' snapshot='external' type='file'> <driver type='qcow2'/> <source file='/*var/lib/libvirt/images/serv1r2-savesnap.qcow2'/*> </disk> <disk name='fda' snapshot='no'/> <disk name='hda' snapshot='no'/> </disks>
# ls -l /var/lib/libvirt/images/serv1r2-savesnap.qcow2 ls: cannot access /var/lib/libvirt/images/serv1r2-savesnap.qcow2: No such file or directory
# virsh snapshot-create-as --domain serv1r2 snap --diskspec vda,file=/var/lib/libvirt/flashimages/serv1r2-snap.qcow2 --disk-only --atomic --no-metadata --quiesce error: internal error: unexpected domain snapshot snap already exists
# virsh snapshot-revert serv1r2 snap error: unsupported configuration: revert to external snapshot not supported yet
Any idea for breaking out of this box?
-- Doug Hughes Keystone NAP Fairless Hills, PA 1.844.KEYBLOCK (539.2562)
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com <mailto:libvirt-users@redhat.com> https://www.redhat.com/mailman/listinfo/libvirt-users <https://www.redhat.com/mailman/listinfo/libvirt-users>
-- Regards, Sakhi Hadebe Engineer: South African National Research Network (SANReN)Competency Area, Meraka, CSIR Tel: +27 12 841 2308 <tel:+27128414213> Fax: +27 12 841 4223 <tel:+27128414223> Cell: +27 71 331 9622 <tel:+27823034657> Email: sakhi@sanren.ac.za <mailto:shadebe@csir.co.za>
-- Doug Hughes Keystone NAP Fairless Hills, PA 1.844.KEYBLOCK (539.2562)
-- Regards, Sakhi Hadebe Engineer: South African National Research Network (SANReN)Competency Area, Meraka, CSIR Tel: +27 12 841 2308 <tel:+27128414213> Fax: +27 12 841 4223 <tel:+27128414223> Cell: +27 71 331 9622 <tel:+27823034657> Email: sakhi@sanren.ac.za <mailto:shadebe@csir.co.za>
-- Doug Hughes Keystone NAP Fairless Hills, PA 1.844.KEYBLOCK (539.2562)

On Wed, Aug 23, 2017 at 11:11:15AM -0400, Doug Hughes wrote:
Oddly, the physical file did not exist. I'm not sure it ever did? (no proof one way or another on that)
From your example, the physical snapshot file ('overlay' file is the correct term) -- var/lib/libvirt/images/serv1r2-savesnap.qcow2 _should_ have existed, "somehow" it got deleted. (See more info further below.)
Can you post what is the output of: virsh domblklist serv1r2
On 8/23/2017 11:09 AM, Sakhi Hadebe wrote:
I had the same problem yesterday. I found the solution from this article https://kashyapc.fedorapeople.org/virt/lc-2012/snapshots-handout.html. According to the article it deletes the tracking metadata by libvirt.
That page is a bit old (I should really update it to the current state of affairs in libvirt), but that bit of content is valid.
You can physically remove the snapshot now that there is no tracking stream data by libvirt
On Wed, Aug 23, 2017 at 4:56 PM, Doug Hughes <doug.hughes@keystonenap.com <mailto:doug.hughes@keystonenap.com>> wrote:
THat did it! Can you esplain what was going on and how that fixed it? Thanks
What fixed your issue was: libvirt still has the metadata tracking information for your snapshot (with non-existent file). Running the `virsh snapshot-delete` command will remove the said snapshot *metadata* for a particular VM. I.e. if you create a snapshot as following, for a VM called 'cvm1': $ virsh snapshot-create-as --domain cvm1 cvm1-overlay1 \ --diskspec vda,file=/export/cvm1-overlay1.qcow2 \ --disk-only --atomic You'll then see a snapshot metadata file created under: /var/lib/libvirt/qemu/snapshot/cvm1/cvm1-overlay1.xml The above file is what libvirt removes when you run the `snapshot-delete [...] metadata`. --- As to the point about reverting to external snapshots, the short story is, lbvirt doesn't yet support reverting to an external snapshot in one single command. But there are easy ways to do it by running a couple of commands manually.
On 8/23/2017 10:50 AM, Sakhi Hadebe wrote:
Hi,
Can you try this command: virsh snapshot-delete serv1r2 snap --metadata
[...] -- /kashyap
participants (3)
-
Doug Hughes
-
Kashyap Chamarthy
-
Sakhi Hadebe