diff --git a/SOURCES/0043-lib-libvirt-Pass-copyonread-flag-through-to-the-libv.patch b/SOURCES/0043-lib-libvirt-Pass-copyonread-flag-through-to-the-libv.patch new file mode 100644 index 0000000..0227bd6 --- /dev/null +++ b/SOURCES/0043-lib-libvirt-Pass-copyonread-flag-through-to-the-libv.patch @@ -0,0 +1,34 @@ +From 1f182ed648b7cf9d4f9f9fdceeb5be69cd2be4ae Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 29 Jun 2017 23:59:15 +0100 +Subject: [PATCH] lib: libvirt: Pass copyonread flag through to the libvirt XML + (RHBZ#1466563). + +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. + +(cherry picked from commit d96209ef07fef3db0e411648348f1b1dcf384e70) +--- + 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 0c2879d..144937b 100644 +--- a/lib/launch-libvirt.c ++++ b/lib/launch-libvirt.c +@@ -1547,7 +1547,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; + } +-- +2.9.4 + diff --git a/SPECS/libguestfs.spec b/SPECS/libguestfs.spec index 3cb330f..0a7fa89 100644 --- a/SPECS/libguestfs.spec +++ b/SPECS/libguestfs.spec @@ -14,7 +14,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.36.3 -Release: 6%{?dist} +Release: 6%{?dist}.2 License: LGPLv2+ # Source and patches. @@ -75,6 +75,7 @@ Patch0039: 0039-v2v-windows-Install-both-legacy-and-modern-virtio-ke.patch Patch0040: 0040-v2v-o-rhv-Add-Windows-2016-Server-type-in-OVF-output.patch Patch0041: 0041-daemon-lvm-Pass-yes-option-to-force-pvresize-RHBZ-14.patch Patch0042: 0042-resize-make-sure-the-input-disk-is-read-only.patch +Patch0043: 0043-lib-libvirt-Pass-copyonread-flag-through-to-the-libv.patch # Use git for patch management. BuildRequires: git @@ -959,6 +960,14 @@ move_to rsync zz-packages-rsync move_to xfsprogs zz-packages-xfs popd +# If there is a bogus dependency on kernel-rt, rename it to 'kernel' +# instead. This happens when the version of kernel-rt in brew is +# greater than the version of kernel (kernel-rt 'Provides: kernel'). +pushd $RPM_BUILD_ROOT%{_libdir}/guestfs/supermin.d +sed 's/^kernel-rt$/kernel/' < packages > packages-t +mv packages-t packages +popd + # Guestfish colour prompts. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d install -m 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d @@ -1282,6 +1291,14 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %changelog +* Mon Jul 17 2017 Pino Toscano - 1:1.36.3-6.el7_4.2 +- Make sure kernel-rt is never used as Requires. + resolves: rhbz#1471829 + +* Wed Jul 12 2017 Pino Toscano - 1:1.36.3-6.el7_4.1 +- Enable the copyonread flag when running the appliance using libvirt. + resolves: rhbz#1469902 + * Thu Jun 22 2017 Pino Toscano - 1:1.36.3-6 - Rebase to libguestfs 1.36 in RHEL 7.4. resolves: rhbz#1359086