mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
qemu: migration: Fix setup of non-shared storage migration in qemuMigrationSrcBeginPhase
In commit6111b23522
removing pre-blockdev code paths I've improperly refactored the setup of non-shared storage migration. Specifically the code checking that there are disks and setting up the NBD data in the migration cookie was originally outside of the loop checking the user provided list of specific disks to migrate, but became part of the block as it was not un-indented when a higher level block was being removed. The above caused that if non-shared storage migration is requested, but the user doesn't provide the list of disks to migrate (thus implying to migrate every appropriate disk) the code doesn't actually setup the migration and then later on falls back to the old-style migration which no longer works with blockdev. Move the check that there's anything to migrate out of the 'nmigrate_disks' block. Fixes:6111b23522
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2125111 Resolves: https://gitlab.com/libvirt/libvirt/-/issues/373 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
f3ca66acc0
commit
83ffeae75a
@ -2609,14 +2609,14 @@ qemuMigrationSrcBeginPhase(virQEMUDriver *driver,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->nbdPort = 0;
|
|
||||||
|
|
||||||
if (qemuMigrationHasAnyStorageMigrationDisks(vm->def,
|
|
||||||
migrate_disks,
|
|
||||||
nmigrate_disks))
|
|
||||||
cookieFlags |= QEMU_MIGRATION_COOKIE_NBD;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priv->nbdPort = 0;
|
||||||
|
|
||||||
|
if (qemuMigrationHasAnyStorageMigrationDisks(vm->def,
|
||||||
|
migrate_disks,
|
||||||
|
nmigrate_disks))
|
||||||
|
cookieFlags |= QEMU_MIGRATION_COOKIE_NBD;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virDomainDefHasMemoryHotplug(vm->def) ||
|
if (virDomainDefHasMemoryHotplug(vm->def) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user