qemu: migration: Switch to blockdev mode for non-shared storage migration

When blockdev is used we always should use the blockdev mode for
non-shared storage migration.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Peter Krempa 2019-09-04 13:20:41 +02:00
parent 8017347549
commit 0ca18ebadc

View File

@ -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,