diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2025-07-21 14:39:13 +0100 |
---|---|---|
committer | Fabiano Rosas <farosas@suse.de> | 2025-07-22 19:39:29 -0300 |
commit | eaec556bc88cc1196f7bbf23d5de311aac1d812f (patch) | |
tree | 780cbc9c9a77d08ae2dea89a35599325b4d2db9d | |
parent | fd1514cbd97bcad5b3dc5d002cab6fee4d7cd45e (diff) | |
download | qemu-eaec556bc88cc1196f7bbf23d5de311aac1d812f.zip qemu-eaec556bc88cc1196f7bbf23d5de311aac1d812f.tar.gz qemu-eaec556bc88cc1196f7bbf23d5de311aac1d812f.tar.bz2 |
migration: show error message when postcopy fails
The 'info migrate' command only shows the error message when the
migration state is 'failed'. When postcopy is used, however,
the 'postcopy-paused' state is used instead of 'failed', so we
must show the error message there too.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/qemu-devel/20250721133913.2914669-1-berrange@redhat.com
[line break to satisfy checkpatch]
Signed-off-by: Fabiano Rosas <farosas@suse.de>
-rw-r--r-- | migration/migration-hmp-cmds.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index a8b879c..0fc21f0 100644 --- a/migration/migration-hmp-cmds.c +++ b/migration/migration-hmp-cmds.c @@ -151,7 +151,9 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict) if (info->has_status) { monitor_printf(mon, "Status: \t\t%s", MigrationStatus_str(info->status)); - if (info->status == MIGRATION_STATUS_FAILED && info->error_desc) { + if ((info->status == MIGRATION_STATUS_FAILED || + info->status == MIGRATION_STATUS_POSTCOPY_PAUSED) && + info->error_desc) { monitor_printf(mon, " (%s)\n", info->error_desc); } else { monitor_printf(mon, "\n"); |