Bug 979477 - virsh tunnelled live migrate ... not work in libvirt > 1.0.5
virsh tunnelled live migrate ... not work in libvirt > 1.0.5
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
x86_64 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Michal Privoznik
Depends On:
  Show dependency treegraph
Reported: 2013-06-28 11:59 EDT by Reno
Modified: 2013-08-06 10:25 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-06 10:25:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Reno 2013-06-28 11:59:40 EDT
Description of problem:
When live migrating a VM with the following command:
    virsh migrate --live --copy-storage-inc --p2p --tunnelled ...

Libvirt will report error: 
    "error : qemuMigrationBeginPhase:2016 : argument unsupported: NBD in tunnelled migration is currently not supported"

But I am sure no NBD device is used or configured in VM. When downgrading to  libvirt 1.0.5, migration is ok and no error occurs.

Version-Release number of selected component (if applicable):
   1.0.6 and 1.1.0

How reproducible:
   Live migrate a VM with above command and libvirt version >= 1.0.6

Actual results:
   Migration failed with error.

Expected results:
   Migration succeeds

Additional info:
Comment 1 Michal Privoznik 2013-07-01 05:04:58 EDT
This is casued by these lines:

src/qemu/qemu_migration.c-2011-    if (flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC) &&
src/qemu/qemu_migration.c-2012-        virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_NBD_SERVER)) {
src/qemu/qemu_migration.c-2013-        /* TODO support NBD for TUNNELLED migration */
src/qemu/qemu_migration.c-2014-        if (flags & VIR_MIGRATE_TUNNELLED) {
src/qemu/qemu_migration.c-2015-            virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
src/qemu/qemu_migration.c:2016:                _("NBD in tunnelled migration is currently not supported"));
src/qemu/qemu_migration.c-2017-            goto cleanup;
src/qemu/qemu_migration.c-2018-        }
src/qemu/qemu_migration.c-2019-        cookieFlags |= QEMU_MIGRATION_COOKIE_NBD;
src/qemu/qemu_migration.c-2020-        priv->nbdPort = 0;
src/qemu/qemu_migration.c-2021-    }

While we give user no ability to choose if NBD is used or not, we should be falling back to old implementation until support for NBD in tunnelled migration is implemented.
Comment 2 Reno 2013-07-30 04:06:07 EDT
Michal, Will this bug be fixed in the libvirt 1.1.1?
Comment 3 Michal Privoznik 2013-08-05 06:21:55 EDT
Patch proposed upstream:

Comment 4 Michal Privoznik 2013-08-06 10:25:19 EDT
I've just pushed the fix upstream:

commit 5de58d87c863752fbcd24a9bd8c0900694b7e5a2
Author:     Michal Privoznik <mprivozn@redhat.com>
AuthorDate: Mon Aug 5 12:05:23 2013 +0200
Commit:     Michal Privoznik <mprivozn@redhat.com>
CommitDate: Tue Aug 6 16:07:57 2013 +0200

    qemu_migration: Don't error on tunelled migration with --copy-storage
    Since 1.0.3 we are using the new way to copy non shared storage during
    migration (the NBD way). However, whether the new or old way is used is
    not controllable by user but unconditionally turned on if both sides of
    migration support it. Moreover, the implementation is not complete: the
    combination for VIR_MIGRATE_TUNNELLED flag is missing (as we need to
    open new port on the destination) in which case we just error out. This
    is a deadly combination: not letting users choose their destiny and
    erroring out. We should not do that but VIR_WARN and turn the NBD off


Note You need to log in before you can comment on or make changes to this bug.