qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH alternative] fix migration to obey -S


From: Glauber Costa
Subject: [Qemu-devel] Re: [PATCH alternative] fix migration to obey -S
Date: Mon, 27 Jul 2009 18:29:23 -0300
User-agent: Jack Bauer

On Mon, Jul 27, 2009 at 11:17:51PM +0200, Paolo Bonzini wrote:
> Since migration returns right away, starting the VM right
> after calling qemu_start_incoming_migration is wrong even
> if -S is not passed.  We have to do this after migration
> has completed.
> 
> Cc: Glauber Costa  <address@hidden>
> Cc: Anthony Liguori  <address@hidden>
> ---
>       This implements the other semantics that glommer
>       also agreed were nice to have.
> 
>  migration-exec.c |    2 ++
>  migration-tcp.c  |    2 ++
>  sysemu.h         |    1 +
>  vl.c             |    4 ++--
>  4 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/migration-exec.c b/migration-exec.c
> index e472979..6249b93 100644
> --- a/migration-exec.c
> +++ b/migration-exec.c
> @@ -118,6 +118,8 @@ static void exec_accept_incoming_migration(void *opaque)
>      dprintf("successfully loaded vm state\n");
>      /* we've successfully migrated, close the fd */
>      qemu_set_fd_handler2(qemu_popen_fd(f), NULL, NULL, NULL, NULL);
> +    if (autostart)
> +        vm_start();
>  
>  err:
>      qemu_fclose(f);
> diff --git a/migration-tcp.c b/migration-tcp.c
> index 7a87a1e..d3feb85 100644
> --- a/migration-tcp.c
> +++ b/migration-tcp.c
> @@ -166,6 +166,8 @@ static void tcp_accept_incoming_migration(void *opaque)
>      /* we've successfully migrated, close the server socket */
>      qemu_set_fd_handler2(s, NULL, NULL, NULL, NULL);
>      close(s);
> +    if (autostart)
> +        vm_start();
>  

Hummm,, those are a little bit weird. I'd expect it to be a characteristic of 
the
source machine, no the destination. IOW, if the machine was running prior to 
migration,
it should be running after it, and if it was stopped prior to migration, it 
should be
stopped after it.

Having dst flags to tamper this seems only confusing to me.





reply via email to

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