From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHILx-00036I-Vh for qemu-devel@nongnu.org; Fri, 30 Jan 2015 15:39:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHILt-00079x-18 for qemu-devel@nongnu.org; Fri, 30 Jan 2015 15:39:45 -0500 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:40851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHILs-00079r-Mi for qemu-devel@nongnu.org; Fri, 30 Jan 2015 15:39:40 -0500 Received: by mail-wi0-f180.google.com with SMTP id h11so4922669wiw.1 for ; Fri, 30 Jan 2015 12:39:40 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <54CBD9C8.2040909@redhat.com> Date: Fri, 30 Jan 2015 14:39:39 -0600 Message-ID: From: Yaodong Yang Content-Type: multipart/alternative; boundary=e89a8f23542b89c4bf050de49afe Subject: Re: [Qemu-devel] vm live storage migration approach. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel --e89a8f23542b89c4bf050de49afe Content-Type: text/plain; charset=UTF-8 Thank you Stefan! Now I understand the workflow. -Yaodong On Fri, Jan 30, 2015 at 2:37 PM, Stefan Hajnoczi wrote: > On Fri, Jan 30, 2015 at 8:13 PM, Yaodong Yang > wrote: > > An follow up questions. > > > > Suppose I have a running VM with two virtual disks, I would like to > migrate > > the vm from host A to host B. Both host A and host B have their own > isolated > > storage devices. Is there anyway to migrate the vm's memory, two virtual > > disk images and other states together from host A to host B? Can > > drive_mirror command itself finish this job? I noticed that drive_mirror > > only mirror for one virtual disk and require both the source and > destination > > share the same storage namespace. I do not know how to migrate the whole > VM > > (memory, storage, network ) together from host A to host B, given that > host > > A and host B have NO shared storage resource. > > > > Could you show me an example, if possible? > > > > I know "migrate -b" works well for this purpose. But the downside is > > "migrate -b" does not mirror Write Requests to both host A and host B > during > > migration. In this case, "migrate -b" has a higher VM downtime during the > > migration. > > Hi Yaodong, > The answers to these questions are in libvirt's source code. It > orchestrates live migration between two hosts. > > Multiple independent drive_mirror jobs can run. That's how you handle > multiple disks. > > The regular migrate command (without -b) can be used if drive_mirror > is in place and fully synced. > > Libvirt sets up an NBD server on the destination host. The source > host runs drive_mirror to copy over the contents of the disk images. > Once the drive_mirror command has completed syncing data the regular > 'migrate' command can be used to send device state and RAM over to the > destination host. > > See qemuMigrationDriveMirror() in libvirt. > > migrate -b is a legacy feature that is being replaced by drive_mirror. > > Stefan > -- Yaodong Yang yaodong.yangy@gmail.com or yyang@cse.unl.edu Computer Science and Engineering Department University of Nebraska-Lincoln Lincoln, NE, USA --e89a8f23542b89c4bf050de49afe Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thank you Stefan! Now I understand the workflow.

<= /div>
-Yaodong

On Fri, Jan 30, 2015 at 2:37 PM, Stefan Hajnoczi <stefanha@g= mail.com> wrote:
On Fri, Jan 30, 2015 at 8:13 PM, Yaodong Yang <yaodong.yangy@gmail.com> wrote:
> An follow up questions.
>
> Suppose I have a running VM with two virtual disks, I would like to mi= grate
> the vm from host A to host B. Both host A and host B have their own is= olated
> storage devices. Is there anyway to migrate the vm's memory, two v= irtual
> disk images and other states together from host A to host B? Can
> drive_mirror command itself finish this job? I noticed that drive_mirr= or
> only mirror for one virtual disk and require both the source and desti= nation
> share the same storage namespace. I do not know how to migrate the who= le VM
> (memory, storage, network ) together from host A to host B, given that= host
> A and host B have NO shared storage resource.
>
> Could you show me an example, if possible?
>
> I know "migrate -b" works well for this purpose. But the dow= nside is
> "migrate -b" does not mirror Write Requests to both host A a= nd host B during
> migration. In this case, "migrate -b" has a higher VM downti= me during the
> migration.

Hi Yaodong,
The answers to these questions are in libvirt's source code.=C2=A0 It orchestrates live migration between two hosts.

Multiple independent drive_mirror jobs can run.=C2=A0 That's how you ha= ndle
multiple disks.

The regular migrate command (without -b) can be used if drive_mirror
is in place and fully synced.

Libvirt sets up an NBD server on the destination host.=C2=A0 The source
host runs drive_mirror to copy over the contents of the disk images.
Once the drive_mirror command has completed syncing data the regular
'migrate' command can be used to send device state and RAM over to = the
destination host.

See qemuMigrationDriveMirror() in libvirt.

migrate -b is a legacy feature that is being replaced by drive_mirror.

Stefan



--
Yaod= ong Yang
Computer Science and Engineering Depa= rtment
University of Nebraska-Lincoln
Lincoln, NE, USA
--e89a8f23542b89c4bf050de49afe--