Bug 2093415

Summary: Virt-v2v can't convert rhel8.6 guest from VMware on rhel8.6 [rhel-8.6.0.z]
Product: Red Hat Enterprise Linux 8 Reporter: RHEL Program Management Team <pgm-rhel-tools>
Component: virt-v2vAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: mxie <mxie>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 8.6CC: chhu, hongzliu, jmaloy, juzhou, mtessun, rjones, tyan, tzheng, vwu, xiaodwan, ymankad
Target Milestone: rcKeywords: Automation, Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-v2v-1.42.0-19.el8_6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2089623 Environment:
Last Closed: 2022-08-02 10:01:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2089623    
Bug Blocks:    

Comment 2 mxie@redhat.com 2022-06-09 07:19:01 UTC
Reproduce the bug with below builds:
virt-v2v-1.42.0-18.module+el8.6.0+14480+c0a3aa0f.x86_64
libguestfs-1.44.0-5.module+el8.6.0+14480+c0a3aa0f.x86_64
nbdkit-1.24.0-4.module+el8.6.0+14480+c0a3aa0f.x86_64
libvirt-8.0.0-5.2.module+el8.6.0+15256+3a0914fe.x86_64
qemu-kvm-6.2.0-11.module+el8.6.0+15489+bc23efef.1.x86_64


Steps to reproduce:
1. Prepare a rhel8.6 guest and do below in guest on VMware
#rm -rf /var/lib/rpm/_db.*
#vi /var/lib/rpm/_db.001 (create a empty _db.001)

2. Convert the guest from VMware by v2v
# virt-v2v -ic vpx://root.227.27/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io  vddk-thumbprint=76:75:59:0E:32:F5:1E:58:69:93:75:5A:7B:51:32:C5:D1:6D:F1:21 -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 -ip /home/passwd esx7.0-rhel8.6-bug2093415
[   0.7] Opening the source -i libvirt -ic vpx://root.227.27/data/10.73.199.217/?no_verify=1 esx7.0-rhel8.6-bug2093415 -it vddk  -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=76:75:59:0E:32:F5:1E:58:69:93:75:5A:7B:51:32:C5:D1:6D:F1:21
[   2.7] Creating an overlay to protect the source from being modified
[   3.8] Opening the overlay
[   9.9] Inspecting the overlay
[  48.8] Checking for sufficient free disk space in the guest
[  48.8] Estimating space required on target for each disk
[  48.8] Converting Red Hat Enterprise Linux 8.6 (Ootpa) to run on KVM
virt-v2v: error: no installed kernel packages were found.

This probably indicates that virt-v2v was unable to inspect this guest 
properly.

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]


Verify the bug with below builds:
virt-v2v-1.42.0-19.module+el8.6.0+15577+2ffd6ffa.x86_64
libguestfs-1.44.0-5.module+el8.6.0+14480+c0a3aa0f.x86_64
nbdkit-1.24.0-4.module+el8.6.0+14480+c0a3aa0f.x86_64
libvirt-8.0.0-5.2.module+el8.6.0+15256+3a0914fe.x86_64
qemu-kvm-6.2.0-11.module+el8.6.0+15489+bc23efef.1.x86_64

Steps:
1.Update virt-v2v and convert the guest again
#  virt-v2v -ic vpx://root.227.27/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io  vddk-thumbprint=76:75:59:0E:32:F5:1E:58:69:93:75:5A:7B:51:32:C5:D1:6D:F1:21 -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 -ip /home/passwd esx7.0-rhel8.6-bug2093415
[   0.6] Opening the source -i libvirt -ic vpx://root.227.27/data/10.73.199.217/?no_verify=1 esx7.0-rhel8.6-bug2093415 -it vddk  -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=76:75:59:0E:32:F5:1E:58:69:93:75:5A:7B:51:32:C5:D1:6D:F1:21
[   2.6] Creating an overlay to protect the source from being modified
[   3.7] Opening the overlay
[   8.8] Inspecting the overlay
[  57.7] Checking for sufficient free disk space in the guest
[  57.7] Estimating space required on target for each disk
[  57.7] Converting Red Hat Enterprise Linux 8.6 (Ootpa) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 164.1] Mapping filesystem data to avoid copying unused and blank areas
[ 165.1] Closing the overlay
[ 165.4] Assigning disks to buses
[ 165.4] Checking if the guest needs BIOS or UEFI to boot
[ 165.4] 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
[ 166.8] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/tmp/v2vnbdkit.zUA7Pe/nbdkit4.sock", "file.export": "/" } (qcow2)
    (100.00/100%)
[ 465.8] Creating output metadata
[ 467.9] Finishing off

2.Check guest after v2v conversion, checkpoints of guest are passed


Result:
  The bug has been fixed.

Comment 10 mxie@redhat.com 2022-06-19 09:43:54 UTC
Verify the bug with below builds:
virt-v2v-1.42.0-19.module+el8.6.0+15577+2ffd6ffa.x86_64
libguestfs-1.44.0-5.module+el8.6.0+14480+c0a3aa0f.x86_64
libvirt-libs-8.0.0-5.2.module+el8.6.0+15256+3a0914fe.x86_64
qemu-img-6.2.0-11.module+el8.6.0+15668+464a1f31.2.x86_64
nbdkit-1.24.0-4.module+el8.6.0+14480+c0a3aa0f.x86_64


Steps:
1. Prepare a rhel8.6 guest and do below in guest on VMware
#rm -rf /var/lib/rpm/_db.*
#vi /var/lib/rpm/_db.001 (create a empty _db.001)

2. Convert the guest from VMware by v2v
#  virt-v2v -ic vpx://root.227.27/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk6.7 -io  vddk-thumbprint=76:75:59:0E:32:F5:1E:58:69:93:75:5A:7B:51:32:C5:D1:6D:F1:21 -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 -ip /home/passwd esx7.0-rhel8.6-bug2093415
[   0.9] Opening the source -i libvirt -ic vpx://root.227.27/data/10.73.199.217/?no_verify=1 esx7.0-rhel8.6-bug2093415 -it vddk  -io vddk-libdir=/home/vddk6.7 -io vddk-thumbprint=76:75:59:0E:32:F5:1E:58:69:93:75:5A:7B:51:32:C5:D1:6D:F1:21
[   2.8] Creating an overlay to protect the source from being modified
[   3.7] Opening the overlay
[   9.0] Inspecting the overlay
[  17.1] Checking for sufficient free disk space in the guest
[  17.1] Estimating space required on target for each disk
[  17.1] Converting Red Hat Enterprise Linux 8.6 (Ootpa) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 139.4] Mapping filesystem data to avoid copying unused and blank areas
[ 140.3] Closing the overlay
[ 140.6] Assigning disks to buses
[ 140.6] Checking if the guest needs BIOS or UEFI to boot
[ 140.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
[ 142.1] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/tmp/v2vnbdkit.lCxYUk/nbdkit4.sock", "file.export": "/" } (qcow2)
    (100.00/100%)
[ 468.7] Creating output metadata
[ 470.9] Finishing off

3. Check guest after v2v conversion, checkpoints of guest are passed


Result:
   The bug has been fixed, move the bug from ON_QA to VERIFIED

Comment 15 errata-xmlrpc 2022-08-02 10:01:20 UTC
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 (Moderate: virt:rhel and virt-devel:rhel security, 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/RHSA-2022:5821