Bug 981460

Summary: libvirt does not check for existing snapshots while deleting disk image
Product: [Community] Virtualization Tools Reporter: Gerasimos Melissaratos <gmelis>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: crobinso, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-09 23:59:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Gerasimos Melissaratos 2013-07-04 19:20:03 UTC
Description of problem:
Snapshot's supporting disk image may be deleted through libvirt with no warning.

Version-Release number of selected component (if applicable):

How reproducible:
Every time

Steps to Reproduce:
1. Create a disk image, set up any operating system.
2. Make a snapshot of this image and boot from the snapshot.
3. Delete the suporting image through virt-manager, and be left hanging.

Actual results:
The snapshot's supporting image is deleted, no questions asked

Expected results:
Some warning, maybe a complete denial to delete image while snapshot exists.

Additional info:

Comment 1 Cole Robinson 2016-04-09 23:59:03 UTC
Sorry this didn't receive a timely response. Deleting disks through virt-manager uses libvirt's storage APIs which I don't think will grow any awareness about if they contain snapshots, or say if a VM is even using the disk, similar to how 'rm' isn't going to tell you what depends on the file. This could be something instead that virt-manager warns about, please file a bug against virt-manager if you're still interested