Add event and state details for post-copy

VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY and VIR_DOMAIN_PAUSED_POSTCOPY are
used on the source host once migration enters post-copy mode (which
means the domain gets paused on the source. After the destination host
takes over the execution of the domain, its virtual CPUs are resumed and
the domain enters VIR_DOMAIN_RUNNING_POSTCOPY state and
VIR_DOMAIN_EVENT_RESUMED_POSTCOPY event is emitted.

In case migration fails during post-copy mode and none of the hosts have
complete state of the domain, both domains will remain paused with
VIR_DOMAIN_PAUSED_POSTCOPY_FAILED reason and an upper layer may decide
what to do.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Jiri Denemark
2016-01-05 12:08:37 +01:00
parent 573c41a275
commit 5a9cbc6265
5 changed files with 31 additions and 6 deletions

View File

@@ -161,6 +161,12 @@ static const char *eventDetailToString(int event, int detail) {
case VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR:
ret = "API error";
break;
case VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY:
ret = "Post-copy";
break;
case VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY_FAILED:
ret = "Post-copy Error";
break;
}
break;
case VIR_DOMAIN_EVENT_RESUMED:
@@ -174,6 +180,9 @@ static const char *eventDetailToString(int event, int detail) {
case VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT:
ret = "Snapshot";
break;
case VIR_DOMAIN_EVENT_RESUMED_POSTCOPY:
ret = "Post-copy";
break;
}
break;
case VIR_DOMAIN_EVENT_STOPPED: