From c03cdcc25ca9b4d2169f5566ea1470758caef812 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 24 Jul 2012 10:21:32 +0100 Subject: launch: libvirt: Set in libvirt XML if g->qemu is not the default. --- src/launch-libvirt.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c index 7c3d189a..a990a332 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -669,6 +669,15 @@ construct_libvirt_xml_devices (guestfs_h *g, xmlTextWriterPtr xo, XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "devices")); + /* Path to qemu. Only write this if the user has changed the + * default, otherwise allow libvirt to choose the best one. + */ + if (g->qemu && STRNEQ (g->qemu, QEMU)) { + XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "emulator")); + XMLERROR (-1, xmlTextWriterWriteString (xo, BAD_CAST g->qemu)); + XMLERROR (-1, xmlTextWriterEndElement (xo)); + } + /* virtio-scsi controller. */ XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "controller")); XMLERROR (-1, -- cgit