Description of problem: assertion failed at parse_ova.ml when ova directory ends with '/' Version-Release number of selected component (if applicable): virt-v2v-1.44.0-1.el9.1.x86_64 How reproducible: 100% Steps to Reproduce: # LIBGUESTFS_BACKEND=direct virt-v2v -i ova esx6_7-rhel8.3-x86_64/ -o null -v -x virt-v2v: virt-v2v 1.44.0rhel=9,release=1.el9.1 (x86_64) libvirt version: 7.0.0 [ 0.0] Opening the source -i ova esx6_7-rhel8.3-x86_64/ libguestfs: trace: set_verbose true libguestfs: trace: set_verbose = 0 libguestfs: trace: get_backend libguestfs: trace: get_backend = "direct" ova: processing manifest file /root/esx6_7-rhel8.3-x86_64/esx6_7-rhel8.3-x86_64.mf virt-v2v: error: internal error: assertion failed at parse_ova.ml, line 273, char 15 rm -rf '/var/tmp/null.VIThot' libguestfs: trace: close libguestfs: closing guestfs handle 0x561f869aff80 (state 0) Actual results: As the description in steps. Expected results: v2v runs the command successfully. Additional info: The command could run successfully after removing the '/' at the end.
Fixed upstream in: a00ce662cb33c33706a013ff98ff89244cd14667 f8428f5eaaff6dedc54a40138f760298a7a3a965
Verify with below builds: Virt-v2v-1.45.1-1.el9.1.x86_64 [root@hp-dl380eg8-01 ova-images]# LIBGUESTFS_BACKEND=direct virt-v2v -i ova esx6_7-rhel8.3-x86_64/ -o null -v -x virt-v2v: virt-v2v 1.45.1rhel=9,release=1.el9.1 (x86_64) libvirt version: 7.4.0 [ 0.0] Opening the source -i ova esx6_7-rhel8.3-x86_64/ libguestfs: trace: set_verbose true libguestfs: trace: set_verbose = 0 libguestfs: trace: get_backend libguestfs: trace: get_backend = "direct" ova: orig_ova = esx6_7-rhel8.3-x86_64/, top_dir = /virt-tools/ova-images/esx6_7-rhel8.3-x86_64, ova_type = Directory ova: processing manifest file /virt-tools/ova-images/esx6_7-rhel8.3-x86_64/esx6_7-rhel8.3-x86_64.mf sha256sum '/virt-tools/ova-images/esx6_7-rhel8.3-x86_64/esx6_7-rhel8.3-x86_64-2.iso' sha256sum '/virt-tools/ova-images/esx6_7-rhel8.3-x86_64/esx6_7-rhel8.3-x86_64-1.vmdk' libguestfs: trace: close libguestfs: closing guestfs handle 0x55e49a2fc660 (state 0) sha256sum '/virt-tools/ova-images/esx6_7-rhel8.3-x86_64/esx6_7-rhel8.3-x86_64.ovf' sha256sum '/virt-tools/ova-images/esx6_7-rhel8.3-x86_64/esx6_7-rhel8.3-x86_64-3.nvram' source name: esx6_7-rhel8.3-x86_64 hypervisor type: vmware VM genid: memory: 2147483648 (bytes) nr vCPUs: 1 CPU vendor: CPU model: CPU topology: sockets: 1 cores/socket: 1 threads/core: 1 CPU features: firmware: bios display: video: sound: disks: /virt-tools/ova-images/esx6_7-rhel8.3-x86_64/esx6_7-rhel8.3-x86_64-1.vmdk (vmdk) [scsi] removable media: CD-ROM [sata] in slot 0 NICs: Bridge "VM Network" [vmxnet3] check_host_free_space: large_tmpdir=/var/tmp free_space=23050342400 [ 18.9] Creating an overlay to protect the source from being modified …………………. ………………….. [ 19.3] Opening the overlay …………………. ………………….. [ 128.1] Mapping filesystem data to avoid copying unused and blank areas …………………. ………………….. [ 130.2] Closing the overlay …………………. ………………….. [ 130.3] Assigning disks to buses …………………. ………………….. [ 130.3] Checking if the guest needs BIOS or UEFI to boot [ 130.3] Initializing the target -o null …………………. ………………….. [ 130.3] Copying disk 1/1 to qemu URI json:{ "file.driver": "null-co", "file.size": "1E" } (raw) overlay file: /var/tmp/v2vovlc4b514.qcow2 overlay device name: sda overlay virtual disk size: 12884901888 overlay source qemu URI: /virt-tools/ova-images/esx6_7-rhel8.3-x86_64/esx6_7-rhel8.3-x86_64-1.vmdk target estimated size: 4314898619 target actual size: None …………………. ………………….. (100.00/100%) virtual copying rate: 4678.6 M bits/sec [ 156.6] Creating output metadata [ 156.6] Finishing off rm -rf '/var/tmp/null.0Elt94' libguestfs: trace: close libguestfs: closing guestfs handle 0x55e49a56bd40 (state 0) ======================= As the bug has been fixed, move the status to VERIFIED.