When blockdev is used we always should use the blockdev mode for
non-shared storage migration.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_migration.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index c13b21a0bb..6ff956b1f5 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -907,6 +907,7 @@ qemuMigrationSrcNBDStorageCopyOne(virQEMUDriverPtr driver,
const char *tlsAlias,
unsigned int flags)
{
+ qemuDomainObjPrivatePtr priv = vm->privateData;
qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
qemuBlockJobDataPtr job = NULL;
char *diskAlias = NULL;
@@ -921,7 +922,8 @@ qemuMigrationSrcNBDStorageCopyOne(virQEMUDriverPtr driver,
qemuBlockJobSyncBegin(job);
- if (flags & VIR_MIGRATE_TLS) {
+ if (flags & VIR_MIGRATE_TLS ||
+ virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV)) {
rc = qemuMigrationSrcNBDStorageCopyBlockdev(driver, vm,
disk, diskAlias,
host, port,
--
2.21.0