[libvirt] (Resend) Live Migration with non-shared storage for kvm

Kenneth Nagin NAGIN at il.ibm.com
Thu Apr 22 15:06:06 UTC 2010


Support for live migration between hosts that do not share storage was
added to qemu-kvm release 0.12.1.
It supports two flags:
-b migration without shared storage with full disk copy
-i migration without shared storage with incremental copy (same base image
shared between source and destination).

In order to support kvm's live migration with non-shared storage I added
two migration flags that user can invoke:

    VIR_MIGRATE_NON_SHARED_DISK   = (1 << 6), /* migration with non-shared
storage with full disk copy */
    VIR_MIGRATE_NON_SHARED_INC    = (1 << 7), /* migration with non-shared
storage with incremental copy */
                                              /* (same base image shared
between source and destination) */
Likewise I add complementary flags to virsh migrate: non_shared_disk and
non_shared_inc

As Daniel B. suggested I also added internal flags to be passed in the
"background" parameter to the qemu monitor:
typedef enum {
  QEMU_MONITOR_MIGRATE_BACKGROUND         = 1 << 0,
  QEMU_MONITOR_MIGRATE_NON_SHARED_DISK  = 1 << 1, /* migration with
non-shared storage with full disk copy */
  QEMU_MONITOR_MIGRATE_NON_SHARED_INC   = 1 << 2, /* migration with
non-shared storage with incremental copy */
  QEMU_MONITOR_MIGRATION_FLAGS_LAST
};

I updated qemu_driver.c's doNativeMigrate and doTunnelMigrate to map the
external flags to the internal flags.
I updated qemu_monitor_text's qemuMonitorTextMigrate to map the internal
flags to the qemu monitor's command line flags.

Also, qemudDomainSave ends up calling qemuMonitorTextMigrate, but it didn't
support the external flags so I assumed that it was not relevant.

I tested the live migration without shared storage (both flags) for native
and p2p with and without tunnelling.  I also verified that the fix doesn't
affect normal migration with shared storage.

Here is the diff patch file from the current git:

(See attached file: libvirt_migration_ns_100422.patch)


-- Kenneth Nagin


>Cole Robinson <crobinso at redhat.com> wrote on 21/04/2010 16:57:29:

> From: Cole Robinson <crobinso at redhat.com>
> To: Kenneth Nagin/Haifa/IBM at IBMIL
> Cc: Daniel Veillard <veillard at redhat.com>, "Daniel P. Berrange"
> <berrange at redhat.com>, list libvirt <libvir-list at redhat.com>
> Date: 21/04/2010 16:57
> Subject: Re: [libvirt] Live Migration with non-shared storage for kvm
>
> On 04/21/2010 03:27 AM, Kenneth Nagin wrote:
> >
> >> Cole Robinson <crobinso at redhat.com> wrote on 20/04/2010 19:10:10:
> >
> >> From: Cole Robinson <crobinso at redhat.com>
> >> To: Kenneth Nagin/Haifa/IBM at IBMIL
> >> Cc: list libvirt <libvir-list at redhat.com>
> >> Date: 20/04/2010 19:10
> >> Subject: Re: [libvirt] Live Migration with non-shared storage for kvm
> >>
> >> On 04/19/2010 01:38 AM, Kenneth Nagin wrote:
> >>>
> >>> On Wed Apr 07 I sent an email with a patch titled  Live Migration
with
> >>> non-shared storage for kvm.  What is the status on the patch?
> >>>
> >>
> >> If it didn't get an adequate response, it's probably a good idea to
> >> rebase the patch against latest code, and resend to the list: people
may
> >> have deleted the old message.
> >>
> >> - Cole
> >>
> >
> > This is the second time I have been asked to rebase.  I submitted the
same
> > patch in February.  Daniel Veillard asked me to rebase that patch.  I
got
> > very busy so I delayed submitting the patch until now.  If necessary
I'll
> > submit again, but I'd like some assurance that I'm not just wasting my
and
> > your time.
> >
>
> If you rebase and resend the patch, I'll review it.
>
> But seriously, everyone is always busy, and sometimes things slip
> through the cracks. If in the future you want to call attention to a
> forgotten patch, either rebase and resend with [RESEND] in the subject,
> or reply to the original patch submission with a 'ping' or similar,
> keeping the original mail intact so people don't have to check the
> archives to find the mail you are talking about.
>
> - Cole
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt_migration_ns_100422.patch
Type: application/octet-stream
Size: 8233 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100422/bae07aeb/attachment-0001.obj>


More information about the libvir-list mailing list