mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
qemu: migration: Don't attempt to fall back to old-style storage migration
QEMU supported the NBD server required for the new-style migration for a long time already and when coupled with -blockdev the old style migration doesn't even work, thus remove support for it. This patch modifies the code to check that the destination returned data for the NBD migration and returns an error if it did not and deletes the fallback code paths which would not work. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
2980268b22
commit
62b3f97aee
@ -4817,10 +4817,15 @@ qemuMigrationSrcRun(virQEMUDriver *driver,
|
||||
}
|
||||
|
||||
if (storageMigration) {
|
||||
if (mig->nbd) {
|
||||
const char *host = "";
|
||||
const char *tlsHostname = qemuMigrationParamsGetTLSHostname(migParams);
|
||||
|
||||
if (!mig->nbd) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("migration of non-shared disks requested but NBD is not set up"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (spec->destType == MIGRATION_DEST_HOST ||
|
||||
spec->destType == MIGRATION_DEST_CONNECT_HOST) {
|
||||
host = spec->dest.host.name;
|
||||
@ -4835,18 +4840,6 @@ qemuMigrationSrcRun(virQEMUDriver *driver,
|
||||
nbdURI, flags) < 0) {
|
||||
goto error;
|
||||
}
|
||||
} else {
|
||||
/* Destination doesn't support NBD server.
|
||||
* Fall back to previous implementation. */
|
||||
VIR_DEBUG("Destination doesn't support NBD server "
|
||||
"Falling back to previous implementation.");
|
||||
|
||||
if (flags & VIR_MIGRATE_NON_SHARED_DISK)
|
||||
migrate_flags |= QEMU_MONITOR_MIGRATE_NON_SHARED_DISK;
|
||||
|
||||
if (flags & VIR_MIGRATE_NON_SHARED_INC)
|
||||
migrate_flags |= QEMU_MONITOR_MIGRATE_NON_SHARED_INC;
|
||||
}
|
||||
}
|
||||
|
||||
if (qemuMigrationSetDBusVMState(driver, vm) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user