[Libguestfs] [PATCH] launch: libvirt: Remove unused USB and memballoon devices.

Richard W.M. Jones rjones at redhat.com
Thu Oct 6 15:20:08 UTC 2016


Thanks: Laine Stump.

See also:
https://www.redhat.com/archives/libvir-list/2016-October/msg00246.html
---
 src/launch-libvirt.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index d8479dc..8779dcb 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -1397,6 +1397,18 @@ construct_libvirt_xml_devices (guestfs_h *g,
       } end_element ();
     }
 
+    /* Libvirt adds some devices by default.  Indicate to libvirt
+     * that we don't want them.
+     */
+    start_element ("controller") {
+      attribute ("type", "usb");
+      attribute ("model", "none");
+    } end_element ();
+
+    start_element ("memballoon") {
+      attribute ("model", "none");
+    } end_element ();
+
   } end_element (); /* </devices> */
 
   return 0;
-- 
2.7.4




More information about the Libguestfs mailing list