]> xenbits.xensource.com Git - libvirt.git/commitdiff
Run 'cont' on successful migration finish.
authorChris Lalancette <clalance@redhat.com>
Wed, 5 Aug 2009 11:42:07 +0000 (13:42 +0200)
committerChris Lalancette <clalance@redhat.com>
Tue, 11 Aug 2009 11:29:10 +0000 (13:29 +0200)
As of qemu 0.10.6, qemu now honors the -S flag on incoming migration.
That means that when the migration completes, we have to issue a
'cont' command to get the VM running again.  We do it unconditionally
since it won't hurt on older qemu.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
src/qemu_driver.c

index ebcb93b859d380f3c4bf4a8cfdb60cda3ae9d481..3ec8451896405bfd53d959a69ff0fdc79b2ce619 100644 (file)
@@ -6597,7 +6597,18 @@ qemudDomainMigrateFinish2 (virConnectPtr dconn,
      */
     if (retcode == 0) {
         dom = virGetDomain (dconn, vm->def->name, vm->def->uuid);
+
+        /* run 'cont' on the destination, which allows migration on qemu
+         * >= 0.10.6 to work properly.  This isn't strictly necessary on
+         * older qemu's, but it also doesn't hurt anything there
+         */
+        if (qemudMonitorCommand(vm, "cont", &info) < 0) {
+            qemudReportError(dconn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+                             "%s", _("resume operation failed"));
+            goto cleanup;
+        }
         VIR_FREE(info);
+
         vm->state = VIR_DOMAIN_RUNNING;
         event = virDomainEventNewFromObj(vm,
                                          VIR_DOMAIN_EVENT_RESUMED,