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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]