I finally built this by applying the patch to libguestfs 1.40.1.
$ ./run virt-v2v -v -x -i disk /home/nsoffer/tmp/sparse-size/src.img -o local -of raw -os /home/nsoffer/tmp/sparse-size
Testing show that this change improves throughput, but converting with local file system is so fast that this is not interesting.
I hope to more interesting results with rhv-upload. Hopefully I can test this next week.
---
With 1.40.1:
qemu-img 'convert' '-p' '-n' '-f' 'qcow2' '-O' 'raw' '/home/nsoffer/src/libguestfs/tmp/v2vovld6b8b9.qcow2' '/home/nsoffer/tmp/sparse-size/src-sda'
(100.00/100%)
du --block-size=1 '/home/nsoffer/tmp/sparse-size/src-sda' | awk '{print $1}'
virtual copying rate: 59718.8 M bits/sec
real copying rate: 11479.2 M bits/sec
sda: estimate 2456662831 (2.3G) versus actual 1238372352 (1.2G): 98.4%
qemu-img 'convert' '-p' '-n' '-f' 'qcow2' '-O' 'raw' '/home/nsoffer/src/libguestfs/tmp/v2vovl70b9b6.qcow2' '/home/nsoffer/tmp/sparse-size/src-sda'
(100.00/100%)
du --block-size=1 '/home/nsoffer/tmp/sparse-size/src-sda' | awk '{print $1}'
virtual copying rate: 65311.3 M bits/sec
real copying rate: 12567.4 M bits/sec
sda: estimate 2456662831 (2.3G) versus actual 1239678976 (1.2G): 98.2%
qemu-img 'convert' '-p' '-n' '-f' 'qcow2' '-O' 'raw' '/home/nsoffer/src/libguestfs/tmp/v2vovl1c8ada.qcow2' '/home/nsoffer/tmp/sparse-size/src-sda'
(100.00/100%)
du --block-size=1 '/home/nsoffer/tmp/sparse-size/src-sda' | awk '{print $1}'
virtual copying rate: 68175.6 M bits/sec
real copying rate: 13118.6 M bits/sec
sda: estimate 2456662831 (2.3G) versus actual 1239678976 (1.2G): 98.2%
With 1.40.1 + patch:
qemu-img 'convert' '-p' '-n' '-f' 'qcow2' '-O' 'raw' '-S' '64k' '/home/nsoffer/src/libguestfs/tmp/v2vovl981419.qcow2' '/home/nsoffer/tmp/sparse-size/src-sda'
(100.00/100%)
du --block-size=1 '/home/nsoffer/tmp/sparse-size/src-sda' | awk '{print $1}'
virtual copying rate: 70717.5 M bits/sec
real copying rate: 13763.8 M bits/sec
sda: estimate 2456662831 (2.3G) versus actual 1253900288 (1.2G): 95.9%
qemu-img 'convert' '-p' '-n' '-f' 'qcow2' '-O' 'raw' '-S' '64k' '/home/nsoffer/src/libguestfs/tmp/v2vovl10e7e3.qcow2' '/home/nsoffer/tmp/sparse-size/src-sda'
(100.00/100%)
du --block-size=1 '/home/nsoffer/tmp/sparse-size/src-sda' | awk '{print $1}'
virtual copying rate: 73361.8 M bits/sec
real copying rate: 14278.5 M bits/sec
sda: estimate 2456662831 (2.3G) versus actual 1253900288 (1.2G): 95.9%
qemu-img 'convert' '-p' '-n' '-f' 'qcow2' '-O' 'raw' '-S' '64k' '/home/nsoffer/src/libguestfs/tmp/v2vovldf5aaf.qcow2' '/home/nsoffer/tmp/sparse-size/src-sda'
(100.00/100%)
du --block-size=1 '/home/nsoffer/tmp/sparse-size/src-sda' | awk '{print $1}'
virtual copying rate: 73106.5 M bits/sec
real copying rate: 14228.8 M bits/sec
sda: estimate 2456662831 (2.3G) versus actual 1253900288 (1.2G): 95.9%