From 35a6ed4f716c1027c04d12a3c499b2e9d6b62c24 Mon Sep 17 00:00:00 2001 From: zhanghailiang Date: Thu, 27 Oct 2016 14:42:52 +0800 Subject: migration: Introduce capability 'x-colo' to migration We add helper function colo_supported() to indicate whether colo is supported or not, with which we use to control whether or not showing 'x-colo' string to users, they can use qmp command 'query-migrate-capabilities' or hmp command 'info migrate_capabilities' to learn if colo is supported. The default value for COLO (COarse-Grain LOck Stepping) is disabled. Cc: Juan Quintela Cc: Amit Shah Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Gonglei Reviewed-by: Eric Blake Reviewed-by: Amit Shah Signed-off-by: Amit Shah --- migration/Makefile.objs | 1 + 1 file changed, 1 insertion(+) (limited to 'migration/Makefile.objs') diff --git a/migration/Makefile.objs b/migration/Makefile.objs index 30ad945918..cff96f0a06 100644 --- a/migration/Makefile.objs +++ b/migration/Makefile.objs @@ -1,5 +1,6 @@ common-obj-y += migration.o socket.o fd.o exec.o common-obj-y += tls.o +common-obj-$(CONFIG_COLO) += colo.o common-obj-y += vmstate.o common-obj-y += qemu-file.o common-obj-y += qemu-file-channel.o -- cgit v1.2.3 From 5821ebf93b1da9f74dc04c20e2923aadfaf803df Mon Sep 17 00:00:00 2001 From: zhanghailiang Date: Thu, 27 Oct 2016 14:42:53 +0800 Subject: COLO: migrate COLO related info to secondary node We can determine whether or not VM in destination should go into COLO mode by referring to the info that was migrated. We skip this section if COLO is not enabled (i.e. migrate_set_capability colo off), so that, It doesn't break compatibility with migration no matter whether users configure the --enable-colo/disable-colo on the source/destination side or not; Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Gonglei Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah Signed-off-by: Amit Shah --- migration/Makefile.objs | 1 + 1 file changed, 1 insertion(+) (limited to 'migration/Makefile.objs') diff --git a/migration/Makefile.objs b/migration/Makefile.objs index cff96f0a06..4bbe9ab313 100644 --- a/migration/Makefile.objs +++ b/migration/Makefile.objs @@ -1,6 +1,7 @@ common-obj-y += migration.o socket.o fd.o exec.o common-obj-y += tls.o common-obj-$(CONFIG_COLO) += colo.o +common-obj-y += colo-comm.o common-obj-y += vmstate.o common-obj-y += qemu-file.o common-obj-y += qemu-file-channel.o -- cgit v1.2.3 From d89e666e0666a0023e4aa6b6b4c4d25d049c5215 Mon Sep 17 00:00:00 2001 From: zhanghailiang Date: Thu, 27 Oct 2016 14:43:03 +0800 Subject: COLO: Add 'x-colo-lost-heartbeat' command to trigger failover We leave users to choose whatever heartbeat solution they want, if the heartbeat is lost, or other errors they detect, they can use experimental command 'x_colo_lost_heartbeat' to tell COLO to do failover, COLO will do operations accordingly. For example, if the command is sent to the Primary side, the Primary side will exit COLO mode, does cleanup work, and then, PVM will take over the service work. If sent to the Secondary side, the Secondary side will run failover work, then takes over PVM's service work. Cc: Luiz Capitulino Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah Signed-off-by: Amit Shah --- migration/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'migration/Makefile.objs') diff --git a/migration/Makefile.objs b/migration/Makefile.objs index 4bbe9ab313..3f3e237142 100644 --- a/migration/Makefile.objs +++ b/migration/Makefile.objs @@ -1,7 +1,7 @@ common-obj-y += migration.o socket.o fd.o exec.o common-obj-y += tls.o -common-obj-$(CONFIG_COLO) += colo.o common-obj-y += colo-comm.o +common-obj-$(CONFIG_COLO) += colo.o colo-failover.o common-obj-y += vmstate.o common-obj-y += qemu-file.o common-obj-y += qemu-file-channel.o -- cgit v1.2.3