|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH 2/3] move vm stop/start to migrate_set_state |
Date: | Thu, 09 Jul 2009 09:41:20 -0500 |
User-agent: | Thunderbird 2.0.0.21 (X11/20090320) |
Paolo Bonzini wrote:
On 07/09/2009 03:53 PM, Anthony Liguori wrote:Paolo Bonzini wrote:On 07/09/2009 03:45 PM, Anthony Liguori wrote:How does the disk become full during the final stage? The guest isn't running.The host disk can become full and cause a "migrate exec" to fail. Or for network migration migration, you could have the connection drop exactly during the final stage. In this case, the VM would be unconditionally restarted.Because migration failed. Is that not the desired behavior? It seems like it is to me.By "unconditionally" I meant "even if the VM used to be paused".
Oh, that's definitely a bug. But that's an easy fix too: diff --git a/migration.c b/migration.c index 190b37e..e6c8b16 100644 --- a/migration.c +++ b/migration.c @@ -261,12 +261,16 @@ void migrate_fd_put_ready(void *opaque) dprintf("iterate\n"); if (qemu_savevm_state_iterate(s->file) == 1) { int state; + int old_vm_running = vm_running; + dprintf("done iterating\n"); vm_stop(0); bdrv_flush_all(); if ((qemu_savevm_state_complete(s->file)) < 0) { - vm_start(); + if (old_vm_running) { + vm_start(); + } state = MIG_STATE_ERROR; } else { state = MIG_STATE_COMPLETED; Regards, Anthony Liguori
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |