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

Pino Toscano ptoscano at redhat.com
Thu Jan 16 14:53:20 UTC 2020


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
                                                          NULL, 0);
   if (!domcapabilities_xml) {
     libvirt_error (g, _("could not get libvirt domain capabilities"));
-- 
2.24.1




More information about the Libguestfs mailing list