]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: migration: Add VM log entry on start of migration
authorPeter Krempa <pkrempa@redhat.com>
Tue, 7 Jun 2016 15:02:14 +0000 (17:02 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 7 Jun 2016 16:10:29 +0000 (18:10 +0200)
Note the start of migration of a qemu process to the VM log file for
possible debug purposes.

src/qemu/qemu_migration.c

index 82d044f591c2fdb225f18270d420c07750abf014..38c07a827b32df0e9822c50395c101046ef0a196 100644 (file)
@@ -4519,6 +4519,7 @@ qemuMigrationRun(virQEMUDriverPtr driver,
     bool inPostCopy = false;
     unsigned int waitFlags;
     virDomainDefPtr persistDef = NULL;
+    char *timestamp;
     int rc;
 
     VIR_DEBUG("driver=%p, vm=%p, cookiein=%s, cookieinlen=%d, "
@@ -4645,6 +4646,12 @@ qemuMigrationRun(virQEMUDriverPtr driver,
         goto exit_monitor;
     }
 
+    /* log start of migration */
+    if ((timestamp = virTimeStringNow()) != NULL) {
+        qemuDomainLogAppendMessage(driver, vm, "%s: initiating migration\n", timestamp);
+        VIR_FREE(timestamp);
+    }
+
     switch (spec->destType) {
     case MIGRATION_DEST_HOST:
         if (STREQ(spec->dest.host.protocol, "rdma") &&