mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user