diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 0cac0c4146..be089a31db 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -3537,14 +3537,16 @@ qemuSnapshotDiscardMetadata(virDomainObj *vm, if (rep.err < 0) ret = -1; - data.snap = snap; - data.vm = vm; - data.error = 0; - virDomainMomentForEachDescendant(snap, - qemuSnapshotDeleteUpdateDisks, - &data); - if (data.error < 0) - ret = -1; + if (virDomainSnapshotIsExternal(snap)) { + data.snap = snap; + data.vm = vm; + data.error = 0; + virDomainMomentForEachDescendant(snap, + qemuSnapshotDeleteUpdateDisks, + &data); + if (data.error < 0) + ret = -1; + } virDomainMomentMoveChildren(snap, snap->parent); }