]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: migration: Forbid tunnelled non-shared storage migration with -blockdev
authorPeter Krempa <pkrempa@redhat.com>
Tue, 24 Nov 2020 07:32:32 +0000 (08:32 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 24 Nov 2020 16:59:26 +0000 (17:59 +0100)
qemu's internals were not prepared for switching to -blockdev for the
legacy storage migration. Add a proper error message since qemu is
unlikely to attempt fixing the old protocol.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/65
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_migration.c

index 13d73638f4f375172840120eab35daeb84aae5ea..2be0fc29ae35d1f1e5ec36195092f139638a961c 100644 (file)
@@ -2220,6 +2220,12 @@ qemuMigrationSrcBeginPhase(virQEMUDriverPtr driver,
 
     if (flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC)) {
         if (flags & VIR_MIGRATE_TUNNELLED) {
+            if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV)) {
+                virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+                               _("migration of non-shared storage is not supported with tunnelled migration and this QEMU"));
+                return NULL;
+            }
+
             if (nmigrate_disks) {
                 virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
                                _("Selecting disks to migrate is not implemented for tunnelled migration"));