diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-07-24 10:21:32 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-07-24 10:21:32 +0100 |
commit | c03cdcc25ca9b4d2169f5566ea1470758caef812 (patch) | |
tree | 9e4e2790935da47913c789bb6079b921b67273ff /src | |
parent | 40e5317cfb4eb804129e9dd1eda0e5769a394520 (diff) | |
download | libguestfs-c03cdcc25ca9b4d2169f5566ea1470758caef812.tar.gz libguestfs-c03cdcc25ca9b4d2169f5566ea1470758caef812.tar.xz libguestfs-c03cdcc25ca9b4d2169f5566ea1470758caef812.zip |
launch: libvirt: Set <emulator> in libvirt XML if g->qemu is not the default.
Diffstat (limited to 'src')
-rw-r--r-- | src/launch-libvirt.c | 9 |
1 files changed, 9 insertions, 0 deletions
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, |