Bug 1655946

Summary: virt-v2v cannot convert opensuse15 guest
Product: Red Hat Enterprise Linux 8 Reporter: liuzi <zili>
Component: libguestfsAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: juzhou, mxie, mzhan, ptoscano, rjones, tzheng, virt-bugs, xiaodwan
Target Milestone: rc   
Target Release: 8.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: libguestfs-1.38.4-7.module+el8+2375+c6b403f4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1634248 Environment:
Last Closed: 2019-06-14 01:29:44 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: 1634248    
Bug Blocks:    

Comment 1 Pino Toscano 2018-12-05 14:29:06 UTC
Copying the public comments (from 1634248):

==============================================

Description of problem:
virt-v2v cannot convert opensuse15 guest

Version-Release number of selected component(if applicable):
virt-v2v-1.38.2-12.el7.x86_64
libguestfs-1.38.2-12.el7.x86_64
libvirt-4.5.0-10.el7.x86_64
qemu-kvm-rhev-2.12.0-18.el7.x86_64
kernel-3.10.0-954.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a opensuse15 guest on vmware and set disk partition is xfs during installing os.
# more /etc/SuSE-brand
openSUSE
VERSION = 15
# cat /etc/fstab
UUID=cc11afe7-fe4c-4bf1-b9df-dcdbbbac8258  /  xfs  defaults  0  0

2.Use virt-v2v to convert the guest from vmware to libvirt, but the conversion is failed
#  virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-opensuse-leap15-x86_64 --password-file /tmp/passwd
[   0.0] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-opensuse-leap15-x86_64
[   2.0] Creating an overlay to protect the source from being modified
[   2.6] Initializing the target -o libvirt -os default
[   2.6] Opening the overlay
[  14.7] Inspecting the overlay
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.

Inspection field ‘i_distro’ was ‘unknown’.

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

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


Actual results:
Can't convert opensuse15 guest by virt-v2v

Expected results:
Can convert opensuse15 guest by virt-v2v

Additional info:
1.Virt-v2v can convert opensuse13.2 successfully,pls refer to bug 1472288(https://bugzilla.redhat.com/show_bug.cgi?id=1472288)
2.Virt-v2v can convert opensuse42.3 successfully,pls refer to bug 1496767(https://bugzilla.redhat.com/show_bug.cgi?id=1496767#c11)

==============================================

The distro is detected as "unknown":

i_root = /dev/sda2
i_type = linux
i_distro = unknown
i_arch = x86_64
i_major_version = 15
i_minor_version = 0
i_package_format = unknown
i_package_management = unknown
i_product_name = openSUSE Leap 15.0
i_product_variant = unknown
i_firmware = BIOS
i_windows_systemroot = 
i_windows_software_hive = 
i_windows_system_hive = 
i_windows_current_control_set = 

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.

Inspection field ‘i_distro’ was ‘unknown’.

==============================================

Untested patch posted:
https://www.redhat.com/archives/libguestfs/2018-October/msg00000.html

==============================================

Upstream as:
https://github.com/libguestfs/libguestfs/commit/70407cd622dda6f088a0876e1e1ae669e9f8a281

Comment 2 Pino Toscano 2018-12-05 14:30:55 UTC
28bd06227b1633fa08c073fe8dbe65d013d7dc9e
is a followup commit to handle also Thumbleweed, and Factory.

Comment 4 mxie@redhat.com 2018-12-13 10:25:08 UTC
Verify the bug with builds:
virt-v2v-1.38.4-7.module+el8+2375+c6b403f4.x86_64
libguestfs-1.38.4-7.module+el8+2375+c6b403f4.x86_64
libvirt-4.5.0-15.module+el8+2285+e990ac42.x86_64
qemu-kvm-2.12.0-47.module+el8+2367+d2ba437c.x86_64
virt:rhel:820181212110715:9edba152:x86_64
kernel: 4.18.0-50.el8.x86_64

Steps:
1.Convert a opensuse15 guest from VMware to rhv by virt-v2v
# virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -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 -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd --password-file /tmp/passwd -os nfs_data -b ovirtmgmt esx6.7-opensuse15-x86_64-xfs
[   1.0] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-opensuse15-x86_64-xfs -it vddk  -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA
[   2.8] Creating an overlay to protect the source from being modified
[   4.5] Initializing the target -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -os nfs_data
[   6.6] Opening the overlay
[  22.2] Inspecting the overlay
[  64.6] Checking for sufficient free disk space in the guest
[  64.6] Estimating space required on target for each disk
[  64.6] Converting openSUSE Leap 15.0 to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 176.7] Mapping filesystem data to avoid copying unused and blank areas
[ 179.0] Closing the overlay
[ 179.4] Checking if the guest needs BIOS or UEFI to boot
[ 179.4] Assigning disks to buses
[ 179.4] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.eFYVKH/nbdkit1.sock", "file.export": "/" } (raw)
    (100.00/100%)
[1357.0] Creating output metadata
[1385.0] Finishing off


2.Power on the guest on rhv4.2 and checkpoints of guest are passed


Result:
   Virt-v2v can convert opensuse15 now, so move the guest from ON_QA to VERIFIED