[Libguestfs] [PATCH] launch: libvirt: use machine type when querying for domcaps

Richard W.M. Jones rjones at redhat.com
Thu Jan 16 15:15:25 UTC 2020


On Thu, Jan 16, 2020 at 03:53:20PM +0100, Pino Toscano wrote:
> On some architectures a certain machine type is used, so use it when
> querying the libvirt domain capabilities.
> ---
>  lib/launch-libvirt.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c
> index 864eae314..f2cad9300 100644
> --- a/lib/launch-libvirt.c
> +++ b/lib/launch-libvirt.c
> @@ -431,7 +431,12 @@ launch_libvirt (guestfs_h *g, void *datav, const char *libvirt_uri)
>    if (parse_capabilities (g, capabilities_xml, data) == -1)
>      goto cleanup;
>  
> -  domcapabilities_xml = virConnectGetDomainCapabilities (conn, NULL, NULL, NULL,
> +  domcapabilities_xml = virConnectGetDomainCapabilities (conn, NULL, NULL,
> +#ifdef MACHINE_TYPE
> +                                                         MACHINE_TYPE,
> +#else
> +                                                         NULL,
> +#endif

I thought we were already doing this, so I'm surprised it
even works on POWER etc at the moment.  ACK

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list