diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 52aa6656404a4d712822b2ba9b9b7ff21f0fb825..1433b2c2f39245e5027cdc85c0739a91e89dca1c 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1236,7 +1236,7 @@ qemuMigrationSrcIsSafe(virDomainDefPtr def, continue; /* However, disks on local FS (e.g. ext4) are not safe. */ - if (virDomainDiskGetType(disk) == VIR_STORAGE_TYPE_FILE) { + if (virStorageSourceGetActualType(disk->src) == VIR_STORAGE_TYPE_FILE) { if ((rc = virFileIsSharedFS(src)) < 0) { return false; } else if (rc == 0) { @@ -1248,8 +1248,8 @@ qemuMigrationSrcIsSafe(virDomainDefPtr def, return false; else if (rc == 1) continue; - } else if (disk->src->type == VIR_STORAGE_TYPE_NETWORK && - disk->src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD) { + } else if (virStorageSourceGetActualType(disk->src) == VIR_STORAGE_TYPE_NETWORK) { + /* But network disks are safe again. */ continue; }