Bug 2070530

Summary: Virt-v2v can't convert guest when os is installed on nvme disk via vmx+ssh
Product: Red Hat Enterprise Linux 9 Reporter: mxie <mxie>
Component: virt-v2vAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Vera <vwu>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.1CC: chhu, hongzliu, juzhou, kkiwi, lersek, rjones, tyan, tzheng, vwu, xiaodwan
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-v2v-2.0.7-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 09:56:05 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:
Bug Depends On: 2059287    
Bug Blocks:    

Description mxie@redhat.com 2022-03-31 11:23:12 UTC
Description of problem:
Virt-v2v can't convert guest when os is installed on nvme disk via vmx+ssh

Version-Release number of selected component (if applicable):
virt-v2v-2.0.1-1.el9.x86_64
libguestfs-1.48.0-2.el9.x86_64
guestfs-tools-1.48.0-1.el9.x86_64
libvirt-libs-8.1.0-1.el9.x86_64
qemu-img-6.2.0-12.el9.x86_64
nbdkit-server-1.30.1-2.el9.x86_64
libnbd-1.12.2-1.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a VMware guest and its os is installed on nvme disk, convert it from VMware via vmx+ssh by v2v
# virt-v2v -i vmx -it ssh ssh://root.75.219/vmfs/volumes/esx6.7-function/esx6.7-rhel8.6-nvme-disk/esx6.7-rhel8.6-nvme-disk.vmx -ip /home/esxpw 
[   0.0] Setting up the source: -i vmx ssh://root.75.219/vmfs/volumes/esx6.7-function/esx6.7-rhel8.6-nvme-disk/esx6.7-rhel8.6-nvme-disk.vmx
(root.75.219) Password: 
[   3.8] Opening the source
[   9.8] Inspecting the source
virt-v2v: error: inspection could not detect the source guest (or physical 
machine).

Assuming that you are running virt-v2v/virt-p2v on a source which is 
supported (and not, for example, a blank disk), then this should not 
happen.

No root device found in this operating system image.

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

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



Actual results:
As above description

Expected results:
Virt-v2v can convert guest when os is installed on nvme disk via vmx+ssh


Additional info:
Virt-v2v can convert guest when os is installed on nvme disk via ova

# virt-v2v -i ova /home/esx6_7-rhel8.6-nvme-disk -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  -oo rhv-cafile=/home/ca.pem -oo rhv-verifypeer
[   0.0] Setting up the source: -i ova /home/esx6_7-rhel8.6-nvme-disk
virt-v2v: warning: making OVA directory public readable to work around 
libvirt bug https://bugzilla.redhat.com/1045069
[   1.1] Opening the source
[   5.3] Inspecting the source
[  11.0] Checking for sufficient free disk space in the guest
[  11.0] Converting Red Hat Enterprise Linux 8.6 Beta (Ootpa) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  96.7] Mapping filesystem data to avoid copying unused and blank areas
[  98.0] Closing the overlay
[  98.3] Assigning disks to buses
[  98.3] Checking if the guest needs BIOS or UEFI to boot
[  98.3] Setting up the destination: -o rhv-upload -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data
[ 117.8] Copying disk 1/1
█ 100% [****************************************]
[ 374.7] Creating output metadata
[ 384.1] Finishing off

Comment 3 Richard W.M. Jones 2022-04-08 15:27:52 UTC
Fixed upstream:

https://github.com/libguestfs/virt-v2v/commit/9e2ab6969716aae75797562c32db74a80602b825
https://github.com/libguestfs/virt-v2v/commit/75872bf282d7f2322110caca70963717b43806b1

We can get this fix by rebasing, so set this bug as a blocker
for the rebase bug.

Comment 6 Vera 2022-04-20 06:08:53 UTC
Verified with the versions.
virt-v2v-2.0.3-1.el9.x86_64
libguestfs-1.48.1-1.el9.x86_64


Step:
convert guest when os is installed on nvme disk via vmx+ssh.

# virt-v2v -i vmx -it ssh ssh://root.75.219/vmfs/volumes/esx6.7-function/esx6.7-rhel8.6-nvme-disk/esx6.7-rhel8.6-nvme-disk.vmx -ip /v2v-ops/esx_data_pwd 
[   0.0] Setting up the source: -i vmx ssh://root.75.219/vmfs/volumes/esx6.7-function/esx6.7-rhel8.6-nvme-disk/esx6.7-rhel8.6-nvme-disk.vmx
(root.75.219) Password: 
(root.75.219) Password: 
[   7.2] Opening the source
[  11.6] Inspecting the source
[  20.8] Checking for sufficient free disk space in the guest
[  20.8] Converting Red Hat Enterprise Linux 8.6 Beta (Ootpa) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 114.0] Mapping filesystem data to avoid copying unused and blank areas
[ 115.1] Closing the overlay
[ 115.2] Assigning disks to buses
[ 115.2] Checking if the guest needs BIOS or UEFI to boot
[ 115.2] Setting up the destination: -o libvirt
[ 117.4] Copying disk 1/1
█ 100% [****************************************]
[ 222.6] Creating output metadata
[ 222.7] Finishing off

Moving to verified.

Comment 8 errata-xmlrpc 2022-11-15 09:56:05 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 (Low: virt-v2v 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:7968