Tried several previous versions of virt-v2v & libguestfs on RHEL9.0.0-z.
Hard to reproduce the issue.
Verified with below versions on the guests which had 'rpmdb --rebuilddb' issues:
qemu-img-6.2.0-11.el9_0.6.x86_64
libvirt-libs-8.0.0-8.5.el9_0.x86_64
libguestfs-1.46.1-5.el9_0.x86_64
virt-v2v-1.45.99-3.el9_0.x86_64
# virt-v2v -ic vpx://root.213.207/data/10.73.212.38/?no_verify=1 esx7.0-rhel8.6-x86_64 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=09:9E:54:CF:C3:36:11:9D:7D:B6:45:E0:85:74:4D:DB:CE:24:7B:46 -ip /v2v-ops/esxpw
[ 0.0] Setting up the source: -i libvirt -ic vpx://root.213.207/data/10.73.212.38/?no_verify=1 -it vddk esx7.0-rhel8.6-x86_64
[ 1.7] Opening the source
[ 7.8] Inspecting the source
[ 14.8] Checking for sufficient free disk space in the guest
[ 14.8] Converting Red Hat Enterprise Linux 8.6 (Ootpa) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 96.0] Mapping filesystem data to avoid copying unused and blank areas
[ 96.6] Closing the overlay
[ 96.9] Assigning disks to buses
[ 96.9] Checking if the guest needs BIOS or UEFI to boot
[ 96.9] Setting up the destination: -o libvirt
[ 98.4] Copying disk 1/1
█ 100% [****************************************]
[ 230.2] Creating output metadata
[ 230.2] Finishing off
# LIBGUESTFS_BACKEND=direct virt-v2v -i disk Auto-kvm-rhel7.1-sparseqcow2.img -o null -v -x |& tee > /verifybug.log
█ 100% [****************************************]
# grep 'rpmdb --rebuilddb' /verifybug.log
Marking Verified:Tested.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (virt-v2v bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:0514