[libvirt] [for 1.2.6 PATCH] qemu: snapshot: Save persistent domain config when taking external snapshot

Martin Kletzander mkletzan at redhat.com
Mon Jun 30 12:33:13 UTC 2014


On Mon, Jun 30, 2014 at 01:54:09PM +0200, Peter Krempa wrote:
>Commit 55bbb011b965c7962933604c70f61cef45e8ec04 introduced a regression
>where we forgot to save the persistent domain configuration after a

s/after a/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.
>---

ACK,

Martin

> src/qemu/qemu_driver.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>index d34da6f..775f6ab 100644
>--- a/src/qemu/qemu_driver.c
>+++ b/src/qemu/qemu_driver.c
>@@ -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,
>--
>1.9.3
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140630/5dbb6287/attachment-0001.sig>


More information about the libvir-list mailing list