[Libguestfs] [PATCH] lib: libvirt: Pass copyonread flag through to the libvirt XML.

Richard W.M. Jones rjones at redhat.com
Thu Jun 29 23:01:36 UTC 2017


From: "Richard W.M. Jones" <rjones at redhat.com>

We were dropping the add_drive copyonread flag when using the libvirt
backend.  This resulted in significant performance degradation (2x-3x
slower) when running virt-v2v against VMware servers.

Thanks: Kun Wei.
---
 lib/launch-libvirt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c
index 948350b..72f86ba 100644
--- a/lib/launch-libvirt.c
+++ b/lib/launch-libvirt.c
@@ -1593,7 +1593,8 @@ construct_libvirt_xml_disk (guestfs_h *g,
 
       if (construct_libvirt_xml_disk_driver_qemu (g, data, drv, xo, format,
                                                   drv->cachemode ? : "writeback",
-                                                  drv->discard, false)
+                                                  drv->discard,
+						  drv->copyonread)
           == -1)
         return -1;
     }
-- 
1.8.3.1




More information about the Libguestfs mailing list