Bug 979477 - virsh tunnelled live migrate ... not work in libvirt > 1.0.5
Summary: virsh tunnelled live migrate ... not work in libvirt > 1.0.5
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Michal Privoznik
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-28 15:59 UTC by Reno
Modified: 2013-08-06 14:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-06 14:25:19 UTC
Embargoed:


Attachments (Terms of Use)

Description Reno 2013-06-28 15:59:40 UTC
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 09:04:58 UTC
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 08:06:07 UTC
Michal, Will this bug be fixed in the libvirt 1.1.1?

Comment 3 Michal Privoznik 2013-08-05 10:21:55 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2013-August/msg00211.html

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

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

    qemu_migration: Don't error on tunelled migration with --copy-storage
    
    https://bugzilla.redhat.com/show_bug.cgi?id=979477
    
    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
    instead.

v1.1.1-66-g5de58d8


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