wakeup event (Since: 0.9.11) */
VIR_DOMAIN_RUNNING_CRASHED = 9, /* resumed from crashed (Since: 1.1.1) */
VIR_DOMAIN_RUNNING_POSTCOPY = 10, /* running in post-copy migration mode (Since: 1.3.3) */
+ VIR_DOMAIN_RUNNING_POSTCOPY_FAILED = 11, /* running in failed post-copy migration (Since: 8.5.0) */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_RUNNING_LAST /* (Since: 0.9.10) */
VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT = 2, /* Resumed from snapshot (Since: 0.9.5) */
VIR_DOMAIN_EVENT_RESUMED_POSTCOPY = 3, /* Resumed, but migration is still
running in post-copy mode (Since: 1.3.3) */
+ VIR_DOMAIN_EVENT_RESUMED_POSTCOPY_FAILED = 4, /* Running, but migration failed in post-copy (Since: 8.5.0) */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_RESUMED_LAST /* (Since: 0.9.10) */
* at most once no matter how fast it changes. On the other hand once the
* guest is running on the destination host, the migration can no longer be
* rolled back because none of the hosts has complete state. If this happens,
- * libvirt will leave the domain paused on both hosts with
- * VIR_DOMAIN_PAUSED_POSTCOPY_FAILED reason. It's up to the upper layer to
- * decide what to do in such case. Because of this, libvirt will refuse to
- * cancel post-copy migration via virDomainAbortJob.
+ * libvirt will leave the domain paused on the source host with
+ * VIR_DOMAIN_PAUSED_POSTCOPY_FAILED reason. The domain on the destination host
+ * will remain running with VIR_DOMAIN_RUNNING_POSTCOPY_FAILED reason.
+ * It's up to the upper layer to decide what to do in such case. Because of
+ * this, libvirt will refuse to cancel post-copy migration via
+ * virDomainAbortJob.
*
* The following domain life cycle events are emitted during post-copy
* migration:
* VIR_DOMAIN_EVENT_RESUMED_MIGRATED (on the destination),
* VIR_DOMAIN_EVENT_STOPPED_MIGRATED (on the source) -- migration finished
* successfully and the destination host holds a complete guest state.
- * VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY_FAILED (on the destination) -- emitted
- * when migration fails in post-copy mode and it's unclear whether any
- * of the hosts has a complete guest state.
+ * VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY_FAILED (on the source),
+ * VIR_DOMAIN_EVENT_RESUMED_POSTCOPY_FAILED (on the destination) -- emitted
+ * when migration fails in post-copy mode and it's unclear whether any of
+ * the hosts has a complete guest state. Virtual CPUs on the destination
+ * are still running.
*
* The progress of a post-copy migration can be monitored normally using
* virDomainGetJobStats on the source host. Fetching statistics of a completed
case VIR_DOMAIN_RUNNING_POSTCOPY:
return VIR_DOMAIN_EVENT_RESUMED_POSTCOPY;
+ case VIR_DOMAIN_RUNNING_POSTCOPY_FAILED:
+ return VIR_DOMAIN_EVENT_RESUMED_POSTCOPY_FAILED;
+
case VIR_DOMAIN_RUNNING_UNKNOWN:
case VIR_DOMAIN_RUNNING_SAVE_CANCELED:
case VIR_DOMAIN_RUNNING_BOOTED: