[libvirt] [PATCH] qemu: Remove managed save flag from VM when starting with --force-boot

Peter Krempa pkrempa at redhat.com
Mon Mar 4 11:16:25 UTC 2013


At the start of the guest after the image is unlinked the state wasn't
touched up to match the state on disk.
---
 src/qemu/qemu_driver.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index d40b5d5..7048ce9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5421,20 +5421,21 @@ qemuDomainObjStart(virConnectPtr conn,
         goto cleanup;

     if (virFileExists(managed_save)) {
         if (force_boot) {
             if (unlink(managed_save) < 0) {
                 virReportSystemError(errno,
                                      _("cannot remove managed save file %s"),
                                      managed_save);
                 goto cleanup;
             }
+            vm->hasManagedSave = false;
         } else {
             ret = qemuDomainObjRestore(conn, driver, vm, managed_save,
                                        start_paused, bypass_cache);

             if (ret == 0) {
                 if (unlink(managed_save) < 0)
                     VIR_WARN("Failed to remove the managed state %s", managed_save);
                 else
                     vm->hasManagedSave = false;
             }
-- 
1.8.1.1




More information about the libvir-list mailing list