| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] migration regression in xen-4.11 and qemu-2.11 and qcow2
 Am Thu, 17 May 2018 08:30:58 +0200
schrieb Olaf Hering <olaf@xxxxxxxxx>:
> I think the issue fixed by 5d6c599fe1d69a1bf8c5c4d3c58be2b31cd625ad is not 
> specific to HVM. It seems domain_suspend_common_guest_suspended would call 
> that changed function only for HVM. It seems the logic is wrong. It is not 
> about the device model, but about that fact that 'disk==qcow2' requires 
> qemu-upstream.
This fixes it for me. Now the question is how to do that properly for all sorts 
of diskimage types.
Olaf
--- a/tools/libxl/libxl_dom_suspend.c
+++ b/tools/libxl/libxl_dom_suspend.c
@@ -385,6 +385,21 @@ static void domain_suspend_common_guest_
             domain_suspend_common_done(egc, dsps, rc);
             return;
         }
+    } else if (dsps->type == LIBXL_DOMAIN_TYPE_PV) {
+        uint32_t const domid = dsps->domid;
+        const char *const filename = dsps->dm_savefile;
+        rc = libxl__qmp_stop(gc, domid);
+        if (rc) {
+            LOGD(ERROR, domid, "failure from libxl__qmp_stop domid:%d", rc);
+            return;
+        }
+        /* Save DM state into filename */
+        rc = libxl__qmp_save(gc, domid, filename, dsps->live);
+        if (rc) {
+            unlink(filename);
+            LOGD(ERROR, domid, "failure from libxl__qmp_save domid:%d", rc);
+            return;
+        }
     }
     domain_suspend_common_done(egc, dsps, 0);
 }
@@ -466,6 +481,12 @@ int libxl__domain_resume(libxl__gc *gc,
             LOGD(ERROR, domid, "failed to resume device model:%d", rc);
             goto out;
         }
+    } else if (type == LIBXL_DOMAIN_TYPE_PV) {
+        if (libxl__qmp_resume(gc, domid)) {
+            rc = ERROR_FAIL;
+            LOGD(ERROR, domid, "failed to resume device model:%d", rc);
+            goto out;
+        }
     }
 
     if (xc_domain_resume(CTX->xch, domid, suspend_cancel)) {
Attachment:
pgpMMtZbtUdKh.pgp _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |