qemu: Block migration when transient disk option is enabled

Block migration when transient disk option is enabled to simplify the
handling of the overlay files.

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tested-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Masayoshi Mizuma 2020-09-17 09:30:42 -04:00 committed by Peter Krempa
parent 83182f0838
commit cb62c23ff7

View File

@ -1394,6 +1394,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"));
return false;
}
}
}
return true;