Bug 1950634

Summary: Open rebase bug for virt-v2v
Product: Red Hat Enterprise Linux 9 Reporter: Richard W.M. Jones <rjones>
Component: virt-v2vAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED CURRENTRELEASE QA Contact: mxie <mxie>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: juzhou, mxie, tyan, tzheng, xiaodwan
Target Milestone: betaKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-v2v-1.45.3-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-07 21:35:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard W.M. Jones 2021-04-17 08:55:45 UTC
Description of problem:

This is a bug allowing us to rebase and fix this package as
required in the next few months.

Comment 4 Richard W.M. Jones 2021-06-30 11:15:32 UTC
Please note this version REMOVES several features:

* -o glance (bug 1977539)

* RHEV-APT installation (bug 1945549)

* --debug-overlays (removed upstream)

* --print-estimate (removed upstream)

The last two will be replaced, eventually, with equivalent features
when virt-v2v is modularized, but for now if there are any tests
covering them you can just disable/delete them for RHEL 9.

Comment 5 Xiaodai Wang 2021-07-01 10:53:54 UTC
> * --debug-overlays (removed upstream)
> 
> * --print-estimate (removed upstream)
> 
> The last two will be replaced, eventually, with equivalent features
> when virt-v2v is modularized, but for now if there are any tests
> covering them you can just disable/delete them for RHEL 9.

Thanks, I put them into skiplist.

Comment 7 mxie@redhat.com 2021-07-22 08:38:35 UTC
Verify the bug with below builds:
virt-v2v-1.45.2-1.el9.x86_64
libguestfs-1.45.6-9.el9.x86_64
guestfs-tools-1.46.1-3.el9.1.x86_64
libvirt-client-7.5.0-1.el9.x86_64
qemu-img-6.0.0-9.el9.x86_64
nbdkit-1.26.2-1.el9.x86_64
virtio-win-1.9.15-3.el9.noarch

Steps:
1.Check virt-v2v related man pages and help info, --debug-overlays, --print-estimate,virt-v2v-copy-to-local has been removed from virt-v2v

# man virt-v2v |grep 'debug-overlays'
nothing
# man virt-v2v |grep 'print-estimate'
nothing
# virt-v2v --help  |grep 'print-estimate'
nothing
# virt-v2v --help |grep 'debug-overlays'
nothing
# man virt-v2v-input-xen |grep virt-v2v-copy-to-local
nothing


2.Switch user to normal user, then rebuild virt-v2v from srpm package
$ rpmbuild --rebuild virt-v2v-1.45.2-1.el9.src.rpm
Wrote: /home/mxie/rpmbuild/RPMS/noarch/virt-v2v-bash-completion-1.45.2-1.el9.noarch.rpm
Wrote: /home/mxie/rpmbuild/RPMS/noarch/virt-v2v-man-pages-ja-1.45.2-1.el9.noarch.rpm
Wrote: /home/mxie/rpmbuild/RPMS/noarch/virt-v2v-man-pages-uk-1.45.2-1.el9.noarch.rpm
Wrote: /home/mxie/rpmbuild/RPMS/x86_64/virt-v2v-debugsource-1.45.2-1.el9.x86_64.rpm
Wrote: /home/mxie/rpmbuild/RPMS/x86_64/virt-v2v-debuginfo-1.45.2-1.el9.x86_64.rpm
Wrote: /home/mxie/rpmbuild/RPMS/x86_64/virt-v2v-1.45.2-1.el9.x86_64.rpm
.....
+ exit 0

Result of step2: can rebuild virt-v2v from srpm package successfully


3.Check if -oa preallocated is disabled in v2v conversion

3.1 Convert a guest from ova file to rhv4.4 by v2v and set -of qcow2 -oa preallocated in command line
#virt-v2v -i ova esx7.0-win2019-x86_64 -o rhv -os 10.73.194.236:/home/nfs_export -of qcow2 -oa preallocated -v -x |& tee > virt-v2v-qcow2-proallocated-via-rhv.log

3.1.1 Log into rhv node, check the disk format of guest by qemu-img
# qemu-img info 5a82c9f5-862d-406b-af9b-969eaacff89b/bac027a6-b31d-41c7-ac3c-4b2a20d04d60
image: 5a82c9f5-862d-406b-af9b-969eaacff89b/bac027a6-b31d-41c7-ac3c-4b2a20d04d60
file format: raw
virtual size: 20 GiB (21474836480 bytes)
disk size: 20 GiB

3.2 Convert a guest from ova file to rhv4.4 by v2v and set -of raw -oa preallocated in command line
# virt-v2v -i ova esx6_7-rhel8.3-x86_64  -o rhv-upload -of raw -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd  -os nfs_data -n ovirtmgmt  -b ovirtmgmt  -oa preallocated
[   1.0] Opening the source -i ova esx6_7-rhel8.3-x86_64
virt-v2v: warning: making OVA directory public readable to work around 
libvirt bug https://bugzilla.redhat.com/1045069
[   9.1] Creating an overlay to protect the source from being modified
[   9.2] Opening the overlay
[  15.4] Inspecting the overlay
[  22.8] Checking for sufficient free disk space in the guest
[  22.8] Converting Red Hat Enterprise Linux 8.3 (Ootpa) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 101.0] Mapping filesystem data to avoid copying unused and blank areas
[ 102.5] Closing the overlay
[ 102.9] Assigning disks to buses
[ 102.9] Checking if the guest needs BIOS or UEFI to boot
[ 102.9] Initializing the target -o rhv-upload -oa preallocated -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -os nfs_data
[ 104.3] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/tmp/v2vnbdkit.WLND92/nbdkit3.sock", "file.export": "/" } (raw)
    (100.00/100%)
[3556.7] Creating output metadata
[3557.7] Finishing off
 
# qemu-img info f2d028bb-e2de-4ae2-b174-c9ba611ddd88/45c7af58-7f0e-47e4-b613-90b400acba9d
image: f2d028bb-e2de-4ae2-b174-c9ba611ddd88/45c7af58-7f0e-47e4-b613-90b400acba9d
file format: raw
virtual size: 12 GiB (12884901888 bytes)
disk size: 12 GiB


3.3 # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.2 -io  vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -o rhv -os 10.73.194.236:/home/nfs_export -of qcow2 -oa preallocated esx7.0-rhel8.4-x86_64 -n ovirtmgmt -on esx7.0-rhel8.4-x86_64-qcow2-preallocated-to-export -ip /home/passwd 
[   0.0] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-rhel8.4-x86_64 -it vddk  -io vddk-libdir=/home/vddk7.0.2 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78
[   1.7] Creating an overlay to protect the source from being modified
[   3.0] Opening the overlay
[  11.3] Inspecting the overlay
[  20.8] Checking for sufficient free disk space in the guest
[  20.8] Converting Red Hat Enterprise Linux 8.4 (Ootpa) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 116.0] Mapping filesystem data to avoid copying unused and blank areas
[ 118.2] Closing the overlay
[ 118.5] Assigning disks to buses
[ 118.5] Checking if the guest needs BIOS or UEFI to boot
[ 118.5] Initializing the target -o rhv -os 10.73.194.236:/home/nfs_export
[ 118.7] Copying disk 1/1 to /tmp/v2v.6iB4sJ/e2409bea-6f48-45e5-804e-6fa3d0660631/images/887a5eac-6874-4a34-bff6-0af31e9e6a91/e857d18a-abbd-47b6-9732-d992e2695f46 (qcow2)
    (100.00/100%)
[ 418.6] Creating output metadata
[ 418.7] Finishing off

# qemu-img info 887a5eac-6874-4a34-bff6-0af31e9e6a91/e857d18a-abbd-47b6-9732-d992e2695f46
image: 887a5eac-6874-4a34-bff6-0af31e9e6a91/e857d18a-abbd-47b6-9732-d992e2695f46
file format: raw
virtual size: 12 GiB (12884901888 bytes)
disk size: 12 GiB


3.4 # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.2 -io  vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78  -of qcow2 -oa preallocated esx7.0-rhel8.4-x86_64 -on esx7.0-rhel8.4-x86_64-qcow2-preallocated-to-export -ip /home/passwd 
[   0.0] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-rhel8.4-x86_64 -it vddk  -io vddk-libdir=/home/vddk7.0.2 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78
[   1.7] Creating an overlay to protect the source from being modified
[   2.8] Opening the overlay
[  10.7] Inspecting the overlay
[  19.2] Checking for sufficient free disk space in the guest
[  19.2] Converting Red Hat Enterprise Linux 8.4 (Ootpa) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 100.7] Mapping filesystem data to avoid copying unused and blank areas
[ 102.8] Closing the overlay
[ 103.1] Assigning disks to buses
[ 103.1] Checking if the guest needs BIOS or UEFI to boot
[ 103.1] Initializing the target -o libvirt -os default
[ 103.1] Copying disk 1/1 to /var/lib/libvirt/images/esx7.0-rhel8.4-x86_64-qcow2-preallocated-to-export-sda (qcow2)
    (100.00/100%)
[ 309.7] Creating output metadata
virt-v2v: warning: could not define libvirt domain: unsupported 
configuration: domain configuration does not support video model 'qxl'.
The libvirt XML is still available in ‘/tmp/v2vlibvirt253470.xml’.  Try 
running ‘virsh -c qemu:///system define /tmp/v2vlibvirt253470.xml’ 
yourself instead.
[ 309.8] Finishing off
[root@hp-dl380eg8-02 home]# qemu-img info /var/lib/libvirt/images/esx7.0-rhel8.4-x86_64-qcow2-preallocated-to-export-sda
image: /var/lib/libvirt/images/esx7.0-rhel8.4-x86_64-qcow2-preallocated-to-export-sda
file format: qcow2
virtual size: 12 GiB (12884901888 bytes)
disk size: 2.84 GiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false

Result of step3:
    1. Option '-oa preallocated' works in 'to rhv' conversion but not works in 'to local' conversion,
    2. Guest disk turns into raw format after rhv conversion if -of qcow2 -oa preallocated is set in v2v command lines 
    2. Guest disk keep qcow2 format if target is local when -of qcow2 -oa preallocated is set in v2v command lines 


4. Convert a guest from rhel5 Xen hypervisor to rhv4.4 by v2v

# eval `ssh-agent`
Agent pid 73761
# ssh-add
# export LIBGUESTFS_BACKEND=direct
# virt-v2v -ic xen+ssh://root.224.33 xen-hvm-rhel7.9-x86_64 -o rhv-upload  -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd  -os nfs_data -n ovirtmgmt  -of qcow2 -ip /home/xenpw 
[   1.1] Opening the source -i libvirt -ic xen+ssh://root.224.33 xen-hvm-rhel7.9-x86_64
root.224.33's password: 
[   6.1] Creating an overlay to protect the source from being modified
qemu-img: warning: Deprecated use of backing file without explicit backing format (detected format of raw)
[   6.6] Opening the overlay
[  12.9] Inspecting the overlay
[  32.0] Checking for sufficient free disk space in the guest
[  32.0] Converting Red Hat Enterprise Linux Server 7.9 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 263.9] Mapping filesystem data to avoid copying unused and blank areas
[ 265.6] Closing the overlay
[ 265.7] Assigning disks to buses
[ 265.7] Checking if the guest needs BIOS or UEFI to boot
[ 265.7] Initializing the target -o rhv-upload -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -os nfs_data
[ 267.2] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/tmp/v2vnbdkit.wZMnlD/nbdkit4.sock", "file.export": "/" } (qcow2)
    (100.00/100%)
[ 822.5] Creating output metadata
[ 823.5] Finishing off

# qemu-img info a2911c8a-9184-423a-b22a-831475c35153/08fb22f4-2a18-459f-8cc1-56609bbd7456
image: a2911c8a-9184-423a-b22a-831475c35153/08fb22f4-2a18-459f-8cc1-56609bbd7456
file format: qcow2
virtual size: 9.77 GiB (10485760000 bytes)
disk size: 3.99 GiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false

Result of step4: conversion can finish successfully and checkpoints of guest are passed after checking guest on rhv4.4


5.Convert a guest from ESXi6.7 via vmx+ssh and -ip option by v2v
#  virt-v2v -i vmx -it ssh ssh://root.75.219/vmfs/volumes/esx6.7-matrix/esx6.7-win10-x86_64-efi/esx6.7-win10-x86_64-efi.vmx -o rhv-upload -of qcow2 -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd  -os nfs_data  -b ovirtmgmt --mac 00:50:56:ac:a0:b9:ip:192.168.1.1,192.168.1.2,24,192.168.1.3,192.168.1.4,192.168.1.5 -ip /home/esxpw
[   0.9] Opening the source -i vmx ssh://root.75.219/vmfs/volumes/esx6.7-matrix/esx6.7-win10-x86_64-efi/esx6.7-win10-x86_64-efi.vmx
(root.75.219) Password: 
(root.75.219) Password: 
[   7.3] Creating an overlay to protect the source from being modified
[   7.6] Opening the overlay
[  13.5] Inspecting the overlay
[  26.4] Checking for sufficient free disk space in the guest
[  26.4] Converting Windows 10 Enterprise to run on KVM
virt-v2v: warning: there is no QXL driver for this version of Windows (10.0 
x86_64).  virt-v2v looks for this driver in 
/usr/share/virtio-win/virtio-win.iso

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[  38.6] Mapping filesystem data to avoid copying unused and blank areas
[  40.5] Closing the overlay
[  40.6] Assigning disks to buses
[  40.6] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[  40.6] Initializing the target -o rhv-upload -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -os nfs_data
[  42.1] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/tmp/v2vnbdkit.SmkCAb/nbdkit4.sock", "file.export": "/" } (qcow2)
    (100.00/100%)
[ 950.8] Creating output metadata
[ 951.9] Finishing off

Result of step5: conversion can finish successfully and checkpoints of guest are passed after checking guest on rhv4.4


6. Convert a guest from ESXi7.0 host to openstack by v2v

6.1 Prepare a rhel9.0 instance which has installed virt-v2v on OSP16.2 environment, we called the instance as 'v2v conversion appliance', enable selinux on 'v2v conversion appliance'
# getenforce
Enforcing

6.2 # virt-v2v -ic esx://root.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.2 -io  vddk-thumbprint=01:53:47:87:7E:09:3E:C4:7A:68:1B:A8:EF:84:93:1E:36:17:45:AE --password-file /home/esxpw  -o openstack -oo server-id=v2v-appliance-rhel9_0 -oo guest-id=12345678-1234-1234-1234-123456789123 -oo verify-server-certificate=true esx7.0-sles15sp2-x86_64-vmware-tools
/usr/lib/python3.9/site-packages/secretstorage/dhcrypto.py:16: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3.9/site-packages/secretstorage/util.py:25: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
[   1.9] Opening the source -i libvirt -ic esx://root.199.217/?no_verify=1 esx7.0-sles15sp2-x86_64-vmware-tools -it vddk  -io vddk-libdir=/home/vddk7.0.2 -io vddk-thumbprint=01:53:47:87:7E:09:3E:C4:7A:68:1B:A8:EF:84:93:1E:36:17:45:AE
[   3.2] Creating an overlay to protect the source from being modified
[   3.9] Opening the overlay
[  22.9] Inspecting the overlay
[  28.7] Checking for sufficient free disk space in the guest
[  28.7] Converting SUSE Linux Enterprise Server 15 SP2 to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  62.7] Mapping filesystem data to avoid copying unused and blank areas
[  63.4] Closing the overlay
[  63.8] Assigning disks to buses
[  63.8] Checking if the guest needs BIOS or UEFI to boot
[  63.8] Initializing the target -o openstack
/usr/lib/python3.9/site-packages/secretstorage/dhcrypto.py:16: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3.9/site-packages/secretstorage/util.py:25: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
Failed to set volume read-only access mode flag: Invalid volume: Volume 671f334b-2d86-42cf-afa8-cbedf55a1c5c status must be available to update readonly flag, but current status is: creating. (HTTP 400) (Request-ID: req-51527d65-76f6-4a04-a4e1-155ff4f7b904)
/usr/lib/python3.9/site-packages/secretstorage/dhcrypto.py:16: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3.9/site-packages/secretstorage/util.py:25: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3.9/site-packages/secretstorage/dhcrypto.py:16: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3.9/site-packages/secretstorage/util.py:25: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
[  82.4] Copying disk 1/1 to /dev/disk/by-id/virtio-671f334b-2d86-42cf-a (raw)
    (100.00/100%)
[ 363.9] Creating output metadata
/usr/lib/python3.9/site-packages/secretstorage/dhcrypto.py:16: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3.9/site-packages/secretstorage/util.py:25: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3.9/site-packages/secretstorage/dhcrypto.py:16: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3.9/site-packages/secretstorage/util.py:25: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
[ 369.8] Finishing off
/usr/lib/python3.9/site-packages/secretstorage/dhcrypto.py:16: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3.9/site-packages/secretstorage/util.py:25: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes

Result of step6.2: the unexpected warning has been tracked by bug1935752 and checkpoints of guest are passed after checking guest on OSP16.2 env



Hi Richard,
 
     Please check the result of step3, thanks!

       1. I saw the change 'Disable -oa preallocated test since it fails in reviewers mock environment' in virt-v2v-1.45.2-1.el9 changelog, but option '-oa preallocated' still works in rhv conversion, but option'-oa preallocated' not works in 'to local' conversion which has been tracked in bug1845518, so I want to confirm if '-oa preallocated' should works in v2v conversion

       2. I found another problem, guest disk will turn into raw format if '-of qcow2 -oa preallocated' is set in v2v rhv conversion, but guest disk can keep qcow2 format if conversion target is 'to local' when '-of qcow2 -oa preallocated' is set in v2v command lines, is it same problem with bug1845518?

Comment 8 Richard W.M. Jones 2021-07-22 10:03:41 UTC
> Result of step3:
>     1. Option '-oa preallocated' works in 'to rhv' conversion but not works in 'to local' conversion,

I think this is bug 1845518.
BTW this problem should be fixed in modular virt-v2v which uses nbdcopy
(https://bugzilla.redhat.com/show_bug.cgi?id=1845518#c5).

>     2. Guest disk turns into raw format after rhv conversion if -of qcow2 -oa preallocated is set in v2v command lines 

This is surprising.  Is it a regression over previous behaviour?
Anyway it looks like it's a bug.

>     2. Guest disk keep qcow2 format if target is local when -of qcow2 -oa preallocated is set in v2v command lines

This is OK.

>        1. I saw the change 'Disable -oa preallocated test since it fails in reviewers mock environment' in virt-v2v-1.45.2-1.el9 changelog, but option '-oa preallocated' still works in rhv conversion, but option'-oa preallocated' not works in 'to local' conversion which has been tracked in bug1845518, so I want to confirm if '-oa preallocated' should works in v2v conversion

I disabled the test because it trips on bug 1845518.
There's not really a good way to fix this given how virt-v2v 1.45
works (using qemu-img convert).  But virt-v2v 2.0 uses nbdcopy which
should allow us to fix this.

>        2. I found another problem, guest disk will turn into raw format if '-of qcow2 -oa preallocated' is set in v2v rhv conversion, but guest disk can keep qcow2 format if conversion target is 'to local' when '-of qcow2 -oa preallocated' is set in v2v command lines, is it same problem with bug1845518?

Not the same as bug 1845518, most likely to be a new bug.

Comment 9 Richard W.M. Jones 2021-08-06 12:17:57 UTC
There shouldn't be much difference between 1.45.2 and 1.45.3.
It's bug fixes and some code refactoring, and it shouldn't
cause visible changes.

Comment 10 mxie@redhat.com 2021-08-11 15:23:05 UTC
Verify the bug with below builds:
virt-v2v-1.45.3-2.el9.x86_64
libguestfs-1.45.6-11.el9.x86_64
guestfs-tools-1.46.1-3.el9.1.x86_64
libvirt-libs-7.6.0-1.el9.x86_64
qemu-img-6.0.0-11.el9.x86_64
nbdkit-1.26.3-1.el9.x86_64
virtio-win-1.9.15-3.el9.noarch

Steps:
1.Switch user to normal user, then rebuild virt-v2v from srpm package
$ rpmbuild --rebuild virt-v2v-1.45.3-2.el9.src.rpm
....
+ exit 0

2. Convert a guest from ESXi6.5 to rhv via vddk6.7 and rhv-upload by v2v
# virt-v2v -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk6.7 -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA  -o rhv-upload -of qcow2 -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -ip /home/passwd -op /home/rhvpasswd  -os nfs_data -n ovirtmgmt  esx6.5-win2019-x86_64 
[   1.1] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-win2019-x86_64 -it vddk  -io vddk-libdir=/home/vddk6.7 -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA
[   3.3] Creating an overlay to protect the source from being modified
[   7.2] Opening the overlay
[  17.2] Inspecting the overlay
[  25.5] Checking for sufficient free disk space in the guest
[  25.5] Converting Windows Server 2019 Standard to run on KVM
virt-v2v: warning: there is no QXL driver for this version of Windows (10.0 
x86_64).  virt-v2v looks for this driver in 
/usr/share/virtio-win/virtio-win.iso

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[ 165.9] Mapping filesystem data to avoid copying unused and blank areas
[ 167.4] Closing the overlay
[ 167.7] Assigning disks to buses
[ 167.7] Checking if the guest needs BIOS or UEFI to boot
[ 167.7] Initializing the target -o rhv-upload -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -os nfs_data
[ 179.5] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/tmp/v2vnbdkit.eLTPRP/nbdkit5.sock", "file.export": "/" } (qcow2)
    (100.00/100%)
[ 822.0] Creating output metadata
[ 884.9] Finishing off

Result of step2: conversion can finish without error and checkpoints of guest are passed

3. Convert a guest from ESXi6.0 to rhv via vddk7.0.2 by v2v
# virt-v2v -ic vpx://root.73.148/data/10.73.72.61/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.2 -io  vddk-thumbprint=AA:F5:4C:48:C9:BF:75:1A:94:41:61:4C:D5:EC:DF:46:48:B5:9B:4D --password-file /home/passwd  esx6.0-win10-x86_64 -o rhv -os 10.73.194.236:/home/nfs_export -of raw -b ovirtmgmt
[   0.0] Opening the source -i libvirt -ic vpx://root.73.148/data/10.73.72.61/?no_verify=1 esx6.0-win10-x86_64 -it vddk  -io vddk-libdir=/home/vddk7.0.2 -io vddk-thumbprint=AA:F5:4C:48:C9:BF:75:1A:94:41:61:4C:D5:EC:DF:46:48:B5:9B:4D
[  12.9] Creating an overlay to protect the source from being modified
[  35.9] Opening the overlay
[  67.2] Inspecting the overlay
[  76.7] Checking for sufficient free disk space in the guest
[  76.7] Converting Windows 10 Enterprise to run on KVM
virt-v2v: warning: there is no QXL driver for this version of Windows (10.0 
x86_64).  virt-v2v looks for this driver in 
/usr/share/virtio-win/virtio-win.iso

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[ 157.8] Mapping filesystem data to avoid copying unused and blank areas
[ 159.4] Closing the overlay
[ 159.7] Assigning disks to buses
[ 159.7] Checking if the guest needs BIOS or UEFI to boot
[ 159.7] Initializing the target -o rhv -os 10.73.194.236:/home/nfs_export
[ 160.7] Copying disk 1/1 to /tmp/v2v.drPD8l/e2409bea-6f48-45e5-804e-6fa3d0660631/images/d5262a31-9374-46b6-8b95-691b515316ec/70a9adef-5992-45df-aec1-12083a36eaed (raw)
    (100.00/100%)
[1085.5] Creating output metadata
[1085.6] Finishing off

Result of step3: conversion can finish without error and checkpoints of guest are passed

4.Convert a guest from ESXi7.0 to local json by v2v 
4.1 #  virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.2 -io  vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-rhel7.9-rhel8.4-multiple_linux_os -ip /home/passwd -o json -os /home
[   0.0] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-rhel7.9-rhel8.4-multiple_linux_os -it vddk  -io vddk-libdir=/home/vddk7.0.2 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78
[   1.9] Creating an overlay to protect the source from being modified
[   2.8] Opening the overlay
[  11.2] Inspecting the overlay

***
Dual- or multi-boot operating system detected.  Choose the root filesystem
that contains the main operating system from the list below:

 [1] /dev/rhel_bootp-73-199-22/root (Red Hat Enterprise Linux Server 7.9 (Maipo))
 [2] /dev/rhel_bootp-73-199-6/root (Red Hat Enterprise Linux 8.4 (Ootpa))

Enter a number between 1 and 2, or ‘exit’: 2
[  55.3] Checking for sufficient free disk space in the guest
[  55.3] Converting Red Hat Enterprise Linux 8.4 (Ootpa) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 158.2] Mapping filesystem data to avoid copying unused and blank areas
virt-v2v: warning: fstrim on guest filesystem 
/dev/mapper/osprober-linux-sda1 failed.  Usually you can ignore this 
message.  To find out more read "Trimming" in virt-v2v(1).

Original message: fstrim: fstrim: /sysroot/: FITRIM ioctl failed: Operation 
not permitted
virt-v2v: warning: fstrim on guest filesystem 
/dev/mapper/osprober-linux-rhel_bootp--73--199--22-root failed.  Usually 
you can ignore this message.  To find out more read "Trimming" in 
virt-v2v(1).

Original message: fstrim: fstrim: /sysroot/: FITRIM ioctl failed: Operation 
not permitted
[ 162.2] Closing the overlay
[ 162.6] Assigning disks to buses
[ 162.6] Checking if the guest needs BIOS or UEFI to boot
[ 162.6] Initializing the target -o json -os /home
[ 162.6] Copying disk 1/1 to /home/esx7.0-rhel7.9-rhel8.4-multiple_linux_os-sda (raw)
    (100.00/100%)
[ 427.4] Creating output metadata
[ 427.4] Finishing off

4.2 # ls /home/esx7.0-rhel7.9-rhel8.4-multiple_linux_os
esx7.0-rhel7.9-rhel8.4-multiple_linux_os.json  esx7.0-rhel7.9-rhel8.4-multiple_linux_os-sda   


Result: the problem of step3 of comment has been tracked by bug1984983, so move the bug from ON_QA to VERIFIED according to comment7 ~ comment10