mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
qemu_snapshot: external: don't error out when updating metadata
Attaching disk into running VM the offline definition may not be updated and we will end up with that disk existing only in live definition. Creating snapshot with this state saves both live and offline definition into snapshot metadata. When we are deleting an external snapshot we are updating these definitions in the snapshot metadata so we should just skip over non-existing disks instead of reporting error. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2174700 Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
2f847ab659
commit
d292ddf1cc
@ -2456,8 +2456,8 @@ qemuSnapshotUpdateDisksSingle(virDomainMomentObj *snap,
|
||||
{
|
||||
virDomainDiskDef *disk = NULL;
|
||||
|
||||
if (!(disk = qemuDomainDiskByName(def, snapDisk->name)))
|
||||
return -1;
|
||||
if (!(disk = virDomainDiskByName(def, snapDisk->name, true)))
|
||||
return 0;
|
||||
|
||||
if (virDomainSnapshotIsExternal(snap)) {
|
||||
virDomainDiskDef *parentDisk = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user