[PATCH 3/3] domain_conf: set default emulator into def if it fails to alloc

Peter Krempa pkrempa at redhat.com
Mon May 9 07:43:02 UTC 2022


On Sat, May 07, 2022 at 17:40:16 +0800, zhangjl02 wrote:
> From: zhangjl02 <zhangjl02 at inspur.com>
> 
> When emulator is not found on host, domainPostParseDataAlloc will return 1,
> and the domain will fail to start. Call domainPostParseDataDefEmulator to
> replace emulator with the default one of guest's arch, and try to alloc again
> after domainPostParseDataAlloc's failure. This will increase error tolerance,
> if emulator defined in xml is not found on host.

What you describe here is definitely not desired. When the user
specifies an emulator path in the XML we must not change it even if the
emulator is not present and we could theoretically use a different one.

This could mask problems and make users use a different binary without
even knowing about it.

If the user wishes to use the default they can certainly omit the
emulator.


More information about the libvir-list mailing list