From 16832e0dd223a0ce1c893962024d62454cb1c5a4 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 6 Dec 2023 14:30:24 +0100 Subject: [PATCH] qemuMigrationDstPrecreateStorage: Improve error messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change the error messages so that they can be used to identify the problematic disk or image. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/qemu/qemu_migration.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index a5488fd477..b303b540cf 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -457,7 +457,7 @@ qemuMigrationDstPrecreateStorage(virDomainObj *vm, if (!(disk = virDomainDiskByTarget(vm->def, nbd->disks[i].target))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to find disk by target: %1$s"), + _("unable to find disk target '%1$s' for non-shared-storage migration"), nbd->disks[i].target); goto cleanup; } @@ -476,8 +476,9 @@ qemuMigrationDstPrecreateStorage(virDomainObj *vm, } if (incremental) { - virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", - _("pre-creation of storage targets for incremental storage migration is not supported")); + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, + _("pre-creation of storage target '%1$s' for incremental storage migration of disk '%2$s' is not supported"), + NULLSTR(diskSrcPath), nbd->disks[i].target); goto cleanup; }