[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] savevm: Improve error message for blocked migra
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] savevm: Improve error message for blocked migration |
Date: |
Tue, 10 Feb 2015 07:22:20 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 02/10/2015 06:25 AM, Kevin Wolf wrote:
> If an internal snapshot can't be saved because migration is blocked
> (most commonly probably because of AHCI), we had a really bad error
> message:
>
> $ echo -e "savevm foo\nquit" | qemu -M q35 /tmp/test.qcow2 -monitor stdio
You know, 'echo -e' is non-portable (even in bash; you can change shopt
so that it outputs a literal "-e" instead of turning on \
interpretation); it's worth getting used to using 'printf' for
portability. But that doesn't affect your commit.
> QEMU 2.2.50 monitor - type 'help' for more information
> (qemu) savevm foo
> Error -22 while writing VM
> (qemu) quit
>
> This patch converts qemu_savevm_state() to the Error infrastructure so
> that a useful error pointing to the problematic device is produced now:
>
> $ echo -e "savevm foo\nquit" | qemu -M q35 /tmp/test.qcow2 -monitor stdio
> QEMU 2.2.50 monitor - type 'help' for more information
> (qemu) savevm foo
> State blocked by non-migratable device '0000:00:1f.2/ich9_ahci'
> (qemu) quit
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> savevm.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature