qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3 v4] Enable migration without shared storage


From: Liran Schour
Subject: Re: [Qemu-devel] [PATCH 3/3 v4] Enable migration without shared storage from the monitor
Date: Thu, 22 Oct 2009 10:05:58 +0200

- Liran

Anthony Liguori <address@hidden> wrote on 21/10/2009 20:27:39:

> Anthony Liguori <address@hidden>
> 21/10/2009 20:27
>
> To
>
> Liran Schour/Haifa/address@hidden
>
> cc
>
> address@hidden
>
> Subject
>
> Re: [Qemu-devel] [PATCH 3/3 v4] Enable migration without shared
> storage from the monitor
>
> address@hidden wrote:
> > This patch adds the option to activate non-shared storage migration
from the
> > monitor.
> > The migration command is 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.
> >
> > Signed-off-by: Liran Schour <address@hidden>
> > ---
> > diff --git a/monitor.c b/monitor.c
> > index 3424e60..ae29181 100644
> > --- a/monitor.c
> > +++ b/monitor.c
> > @@ -2907,6 +2907,18 @@ static int default_fmt_size = 4;
> >
> >  #define MAX_ARGS 16
> >
> > +static int is_valid_option(const char *c, const char *typestr)
> > +{
> > +  char option[3];
> > +
> > +  option[0] = '-';
> > +  option[1] = *c;
> > +  option[2] = '\0';
> > +
> > +  typestr = strstr(typestr, option);
> > +  return (typestr != NULL);
> > +}
> >
>
> This is pretty darn funky.  Can you explain why this is needed?
>

Migrate is the first command that uses more then one '-x' option. The code
was not
prepared for that.
The code assumes that there is only one '-x' option. So in our case we want
to be able to do 'migrate -d -b tcp:....' and also 'migrate -b tcp:.....'
in the
second case the origin code will look for '-d' when it will see a different
'-b'
it will shout "unsupported option -b". I have added the code that in case
that
'-d' != '-b' the code will look if '-b' is still a valid option in typestr
and
then will only skip this key and continue.

- Liran





reply via email to

[Prev in Thread] Current Thread [Next in Thread]