[libvirt] [PATCH 3/3] Debug: Report VM errors more concisely.

Peter Krempa pkrempa at redhat.com
Wed Mar 22 08:12:44 UTC 2017


On Wed, Mar 22, 2017 at 01:02:19 -0700, Prerna Saxena wrote:
> Current logs:
> error : qemuProcessFindDomainDiskByAlias:411 : internal error: no disk found with alias ide0-0-0
> 
> There is no way to find which VM was seeing this error.
> Makes debugging very hard, and the message itself is no good.
> 
> Signed-off-by: Prerna Saxena <saxenap.ltc at gmail.com>
> ---
>  src/qemu/qemu_process.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index ec0e36d..9f5bc3a 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -366,8 +366,8 @@ qemuProcessFindDomainDiskByAlias(virDomainObjPtr vm,
>      }
>  
>      virReportError(VIR_ERR_INTERNAL_ERROR,
> -                   _("no disk found with alias %s"),
> -                   alias);
> +                   _("VM %s: no disk found with alias %s"),
> +                   vm->def->name, alias);

I think a better option is to enable debug logs anyways. This message
won't really help you debug the issue if you don't get the additional
data from where the problem happened.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170322/fa5473ff/attachment-0001.sig>


More information about the libvir-list mailing list