]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuMigrationDstPrecreateStorage: Improve error messages
authorPeter Krempa <pkrempa@redhat.com>
Wed, 6 Dec 2023 13:30:24 +0000 (14:30 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 13 Dec 2023 19:15:49 +0000 (20:15 +0100)
Change the error messages so that they can be used to identify the
problematic disk or image.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_migration.c

index a5488fd477f6cd75d5ccef3b8f7efaa6a5a1d54b..b303b540cf6332be3bf91e778cf4e61901cfa644 100644 (file)
@@ -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;
         }