Migrating into a 'directory' won't ever work as we ask qemu to emulate a
fat filesystem, so restoring of the files won't be possible. Same for
'vhost-user' disks which don't support blockjobs as there's no block
backend used in qemu.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_migration.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index d248f87c2d..4c524fafe4 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -475,7 +475,6 @@ qemuMigrationDstPrepareStorage(virDomainObj *vm,
break;
case VIR_STORAGE_TYPE_FILE:
- case VIR_STORAGE_TYPE_DIR:
exists = virFileExists(disk->src->path);
break;
@@ -493,9 +492,15 @@ qemuMigrationDstPrepareStorage(virDomainObj *vm,
exists = virFileExists(disk->src->vdpadev);
break;
+ case VIR_STORAGE_TYPE_VHOST_USER:
+ case VIR_STORAGE_TYPE_DIR:
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
+ _("non-shared storage migration into '%1$s'
target is not supported"),
+
virStorageTypeToString(virStorageSourceGetActualType(disk->src)));
+ return -1;
+
case VIR_STORAGE_TYPE_NETWORK:
case VIR_STORAGE_TYPE_VOLUME:
- case VIR_STORAGE_TYPE_VHOST_USER:
case VIR_STORAGE_TYPE_LAST:
case VIR_STORAGE_TYPE_NONE:
break;
--
2.43.0