[PATCH 5/5] qemu: migration: Add VM log entry on start of migration

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

 



Note the start of migration of a qemu process to the VM log file for
possible debug purposes.
---
 src/qemu/qemu_migration.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 82d044f..38c07a8 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -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") &&
-- 
2.8.3

--
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]