1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-02-08 09:57:26 +03:00

qemu: snapshot: Save persistent domain config when taking external snapshot

Commit 55bbb011b965c7962933604c70f61cef45e8ec04 introduced a regression
where we forgot to save the persistent domain configuration after an
external snapshot. This would make libvirt forget the snapshots and
effectively revert to the previous state in the following scenario:

1) Start VM
2) Take snapshot
3) Destroy VM
4) Restart libvirtd

Also fix spurious blank line added by patch mentioned above.
This commit is contained in:
Peter Krempa 2014-06-30 13:44:26 +02:00
parent b963ca06d4
commit 9036b31aed

View File

@ -13126,8 +13126,10 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
int indx = virDomainDiskIndexByName(vm->newDef,
vm->def->disks[i]->dst,
false);
if (indx >= 0)
if (indx >= 0) {
persistDisk = vm->newDef->disks[indx];
persist = true;
}
}
ret = qemuDomainSnapshotCreateSingleDiskActive(driver, vm,
@ -13173,7 +13175,6 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
persistDisk = vm->newDef->disks[indx];
persist = true;
}
}
qemuDomainSnapshotUndoSingleDiskActive(driver, vm,