On Thu, Sep 17, 2020 at 09:30:42 -0400, Masayoshi Mizuma wrote:
From: Masayoshi Mizuma <m.mizuma(a)jp.fujitsu.com>
Block migration when transient disk option is enabled because migration
requires some blockjobs.
Signed-off-by: Masayoshi Mizuma <m.mizuma(a)jp.fujitsu.com>
---
src/qemu/qemu_migration.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index a530c17582..7316d74677 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1397,6 +1397,16 @@ qemuMigrationSrcIsAllowed(virQEMUDriverPtr driver,
_("cannot migrate this domain without dbus-vmstate
support"));
return false;
}
+
+ for (i = 0; i < vm->def->ndisks; i++) {
+ virDomainDiskDefPtr disk = vm->def->disks[i];
+
+ if (disk->transient) {
+ virReportError(VIR_ERR_OPERATION_INVALID, "%s",
+ _("migration with transient disk is not
supported"));
transient disk '%s' is not supported
and use disk->dst as '%s'
+ return false;
+ }
+ }
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>