From b3f7f0c5e6449be7275f1762bccbfa2177395a3b Mon Sep 17 00:00:00 2001 From: zhanghailiang Date: Thu, 27 Oct 2016 14:43:05 +0800 Subject: COLO: Implement the process of failover for primary VM For primary side, if COLO gets failover request from users. To be exact, gets 'x_colo_lost_heartbeat' command. COLO thread will exit the loop while the failover BH does the cleanup work and resumes VM. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah Signed-off-by: Amit Shah --- include/migration/colo.h | 3 +++ include/migration/failover.h | 1 + 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/migration/colo.h b/include/migration/colo.h index e9ac2c343a..e32eef4763 100644 --- a/include/migration/colo.h +++ b/include/migration/colo.h @@ -32,4 +32,7 @@ void *colo_process_incoming_thread(void *opaque); bool migration_incoming_in_colo_state(void); COLOMode get_colo_mode(void); + +/* failover */ +void colo_do_failover(MigrationState *s); #endif diff --git a/include/migration/failover.h b/include/migration/failover.h index 7e0f36a274..ad91ef2381 100644 --- a/include/migration/failover.h +++ b/include/migration/failover.h @@ -21,5 +21,6 @@ FailoverStatus failover_set_state(FailoverStatus old_state, FailoverStatus new_state); FailoverStatus failover_get_state(void); void failover_request_active(Error **errp); +bool failover_request_is_active(void); #endif -- cgit v1.2.3