qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] migrate: Migration aborts abruptly for machine


From: Greg Kurz
Subject: Re: [Qemu-devel] [PATCH] migrate: Migration aborts abruptly for machine "none"
Date: Sat, 28 Jan 2017 19:41:57 +0100

On Thu, 26 Jan 2017 14:46:52 +0530
Ashijeet Acharya <address@hidden> wrote:

> Migration of a "none" machine with no RAM crashes abruptly as
> bitmap_new() fails and thus aborts. Instead, place a check for
> last_ram_offset() being '0' at the start of ram_save_setup() and
> error out with a meaningful error message.
> 
> Signed-off-by: Ashijeet Acharya <address@hidden>
> ---

Maybe a naive question: why a "none" machine with zero RAM should fail to
migrate ?

>  migration/ram.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/migration/ram.c b/migration/ram.c
> index ef8fadf..bf05d69 100644
> --- a/migration/ram.c
> +++ b/migration/ram.c
> @@ -1947,6 +1947,11 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
>  {
>      RAMBlock *block;
>  
> +    if (last_ram_offset() == 0) {
> +        error_report("Failed to migrate: No RAM available!");
> +        return -1;
> +    }
> +
>      /* migration has already setup the bitmap, reuse it. */
>      if (!migration_in_colo_state()) {
>          if (ram_save_init_globals() < 0) {




reply via email to

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