qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3 v3] Live migration without shared storage
@ 2009-09-17 13:31 lirans
  2009-09-17 14:03 ` [Qemu-devel] " Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: lirans @ 2009-09-17 13:31 UTC (permalink / raw)
  To: qemu-devel

This series adds support for live migration without shared storage, means 
copy the storage while migrating. It was tested with KVM. Supports 2 ways 
to replicate the storage during migration:
 1. Complete copy of storage to destination 
 2. Assuming the storage is cow based, copy only the allocated 
    data, time of the migration will be linear with the amount of allocated 
    data (user responsibility to verify that the same backend file reside 
    on src and destination).

Live migration will work as follows:
(qemu) migrate -d tcp:0:4444 # for ordinary live migration
(qemu) migrate -d -b tcp:0:4444 # for live migration with complete storage copy
(qemu) migrate -d -i tcp:0:4444 # for live migration with incremental storage copy, storage is cow based.

The patches are against qemu.git tree

 Makefile          |    1 +
 block-migration.c |   43 ++++++++++++-----------------------------
 block-migration.h |    2 +-
 block.c           |   27 ++++++++++++++++++++++++++
 block.h           |    6 ++++-
 block_int.h       |    1 +
 buffered_file.c   |   10 ++++++++-
 hw/hw.h           |    9 ++++++-
 migration-exec.c  |    9 ++++++-
 migration-fd.c    |    7 +++++-
 migration-tcp.c   |    7 +++++-
 migration-unix.c  |    7 +++++-
 migration.c       |   20 +++++++++++++-----
 migration.h       |   20 ++++++++++++++----
 monitor.c         |   38 +++++++++++++++++++++++++++++-------
 qemu-monitor.hx   |    6 +++-
 savevm.c          |   54 +++++++++++++++++++++++++++++++++++++---------------
 sysemu.h          |    2 +-
 vl.c              |    6 ++++-
 19 files changed, 196 insertions(+), 79 deletions(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] Re: [PATCH 0/3 v3] Live migration without shared storage
  2009-09-17 13:31 [Qemu-devel] [PATCH 0/3 v3] Live migration without shared storage lirans
@ 2009-09-17 14:03 ` Jan Kiszka
  2009-09-17 14:43   ` Liran Schour
  2009-09-17 15:38   ` Kevin Wolf
  0 siblings, 2 replies; 6+ messages in thread
From: Jan Kiszka @ 2009-09-17 14:03 UTC (permalink / raw)
  To: lirans; +Cc: qemu-devel

lirans@il.ibm.com wrote:
> This series adds support for live migration without shared storage, means 
> copy the storage while migrating. It was tested with KVM. Supports 2 ways 
> to replicate the storage during migration:
>  1. Complete copy of storage to destination 
>  2. Assuming the storage is cow based, copy only the allocated 
>     data, time of the migration will be linear with the amount of allocated 
>     data (user responsibility to verify that the same backend file reside 
>     on src and destination).

For my understanding: Does it require the use of qcow[2] or does it also
work with raw images?

> 
> Live migration will work as follows:
> (qemu) migrate -d tcp:0:4444 # for ordinary live migration
> (qemu) migrate -d -b tcp:0:4444 # for live migration with complete storage copy
> (qemu) migrate -d -i tcp:0:4444 # for live migration with incremental storage copy, storage is cow based.
> 
> The patches are against qemu.git tree

...but without signed-off. Are they RFC for now or do you propose them
for merge?

Jan

PS: I think there are some style issues remaining like tabs or long lines.

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] Re: [PATCH 0/3 v3] Live migration without shared storage
  2009-09-17 14:03 ` [Qemu-devel] " Jan Kiszka
@ 2009-09-17 14:43   ` Liran Schour
  2009-09-17 15:08     ` Jan Kiszka
  2009-09-17 15:38   ` Kevin Wolf
  1 sibling, 1 reply; 6+ messages in thread
From: Liran Schour @ 2009-09-17 14:43 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel


Jan Kiszka <jan.kiszka@siemens.com> wrote on 17/09/2009 17:03:04:

> lirans@il.ibm.com wrote:
> > This series adds support for live migration without shared storage,
means
> > copy the storage while migrating. It was tested with KVM. Supports 2
ways
> > to replicate the storage during migration:
> >  1. Complete copy of storage to destination
> >  2. Assuming the storage is cow based, copy only the allocated
> >     data, time of the migration will be linear with the amount of
allocated
> >     data (user responsibility to verify that the same backend file
reside
> >     on src and destination).
>
> For my understanding: Does it require the use of qcow[2] or does it also
> work with raw images?

If you call migrate -b it will do a full copy of the disk,
if you call migrate -i it will do incremental copy means that if you have
qcow disk it will copy only the allocated data. The base image should be
identical
in both source and destination.

> >
> > Live migration will work as follows:
> > (qemu) migrate -d tcp:0:4444 # for ordinary live migration
> > (qemu) migrate -d -b tcp:0:4444 # for live migration with complete
> storage copy
> > (qemu) migrate -d -i tcp:0:4444 # for live migration with
> incremental storage copy, storage is cow based.
> >
> > The patches are against qemu.git tree
>
> ...but without signed-off. Are they RFC for now or do you propose them
> for merge?

I think that RFC is good for now.

> Jan
>
> PS: I think there are some style issues remaining like tabs or long
lines.

Thanks I will fix that.

- Liran

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] Re: [PATCH 0/3 v3] Live migration without shared storage
  2009-09-17 14:43   ` Liran Schour
@ 2009-09-17 15:08     ` Jan Kiszka
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2009-09-17 15:08 UTC (permalink / raw)
  To: Liran Schour; +Cc: qemu-devel@nongnu.org

Liran Schour wrote:
> Jan Kiszka <jan.kiszka@siemens.com> wrote on 17/09/2009 17:03:04:
> 
>> lirans@il.ibm.com wrote:
>>> This series adds support for live migration without shared storage,
> means
>>> copy the storage while migrating. It was tested with KVM. Supports 2
> ways
>>> to replicate the storage during migration:
>>>  1. Complete copy of storage to destination
>>>  2. Assuming the storage is cow based, copy only the allocated
>>>     data, time of the migration will be linear with the amount of
> allocated
>>>     data (user responsibility to verify that the same backend file
> reside
>>>     on src and destination).
>> For my understanding: Does it require the use of qcow[2] or does it also
>> work with raw images?
> 
> If you call migrate -b it will do a full copy of the disk,
> if you call migrate -i it will do incremental copy means that if you have
> qcow disk it will copy only the allocated data. The base image should be
> identical
> in both source and destination.

Ah, ok. So this doesn't affect the feasibility, "just" the effort needed
for the replication.

> 
>>> Live migration will work as follows:
>>> (qemu) migrate -d tcp:0:4444 # for ordinary live migration
>>> (qemu) migrate -d -b tcp:0:4444 # for live migration with complete
>> storage copy
>>> (qemu) migrate -d -i tcp:0:4444 # for live migration with
>> incremental storage copy, storage is cow based.
>>> The patches are against qemu.git tree
>> ...but without signed-off. Are they RFC for now or do you propose them
>> for merge?
> 
> I think that RFC is good for now.

[RFC][PATCH ...] :)

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Re: [PATCH 0/3 v3] Live migration without shared storage
  2009-09-17 14:03 ` [Qemu-devel] " Jan Kiszka
  2009-09-17 14:43   ` Liran Schour
@ 2009-09-17 15:38   ` Kevin Wolf
  2009-09-21  7:42     ` Liran Schour
  1 sibling, 1 reply; 6+ messages in thread
From: Kevin Wolf @ 2009-09-17 15:38 UTC (permalink / raw)
  To: lirans; +Cc: qemu-devel

Am 17.09.2009 16:03, schrieb Jan Kiszka:
> lirans@il.ibm.com wrote:
>> This series adds support for live migration without shared storage, means 
>> copy the storage while migrating. It was tested with KVM. Supports 2 ways 
>> to replicate the storage during migration:
>>  1. Complete copy of storage to destination 
>>  2. Assuming the storage is cow based, copy only the allocated 
>>     data, time of the migration will be linear with the amount of allocated 
>>     data (user responsibility to verify that the same backend file reside 
>>     on src and destination).
> 
> For my understanding: Does it require the use of qcow[2] or does it also
> work with raw images?

This leads me to the question what the block migration is doing with
qcow2 images (or better: images in any format but raw). What happens
with non-standard image options (like cluster size)? Are snapshots
copied over or won't they be available any more on the destination host?

Kevin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Re: [PATCH 0/3 v3] Live migration without shared storage
  2009-09-17 15:38   ` Kevin Wolf
@ 2009-09-21  7:42     ` Liran Schour
  0 siblings, 0 replies; 6+ messages in thread
From: Liran Schour @ 2009-09-21  7:42 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel


Kevin Wolf <kwolf@redhat.com> wrote on 17/09/2009 18:38:59:

> Am 17.09.2009 16:03, schrieb Jan Kiszka:
> > lirans@il.ibm.com wrote:
> >> This series adds support for live migration without shared storage,
means
> >> copy the storage while migrating. It was tested with KVM. Supports 2
ways
> >> to replicate the storage during migration:
> >>  1. Complete copy of storage to destination
> >>  2. Assuming the storage is cow based, copy only the allocated
> >>     data, time of the migration will be linear with the amount
ofallocated
> >>     data (user responsibility to verify that the same backend file
reside
> >>     on src and destination).
> >
> > For my understanding: Does it require the use of qcow[2] or does it
also
> > work with raw images?
>
> This leads me to the question what the block migration is doing with
> qcow2 images (or better: images in any format but raw). What happens
> with non-standard image options (like cluster size)? Are snapshots
> copied over or won't they be available any more on the destination host?
>

For now the block migration will only copy data. 2 ways for replicating the
data:
-b means copy all data to the destination, image on the destination can be
in a
different format from source but all blocks will be written.
-i means copy only allocated data, only the data that is allocated and
valid will
be copied (I use bdrv_is_allocated() to figure out what to copy). Base
image should
be identical on source and target. No snapshot or any kind of metadata will
be copied,
snapshots will be lost on this case.
It is possible to replicate snapshots data also but I did not implement
that for now.

- Liran

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-09-21  7:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-17 13:31 [Qemu-devel] [PATCH 0/3 v3] Live migration without shared storage lirans
2009-09-17 14:03 ` [Qemu-devel] " Jan Kiszka
2009-09-17 14:43   ` Liran Schour
2009-09-17 15:08     ` Jan Kiszka
2009-09-17 15:38   ` Kevin Wolf
2009-09-21  7:42     ` Liran Schour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).