Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2041852

Summary: Improve the unclear assertion failure at input_xen_ssh.ml
Product: Red Hat Enterprise Linux 9 Reporter: Xiaodai Wang <xiaodwan>
Component: virt-v2vAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: tingting zheng <tzheng>
Severity: low Docs Contact:
Priority: unspecified    
Version: 9.0CC: juzhou, lersek, mxie, rjones, tyan, tzheng, vwu
Target Milestone: rcKeywords: Automation, Regression
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-v2v-1.45.97-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 13:41:56 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:
Deadline: 2022-02-14   

Description Xiaodai Wang 2022-01-18 11:41:58 UTC
Description of problem:
Improve the unclear assertion failure at input_xen_ssh.ml

Version-Release number of selected component (if applicable):
virt-v2v-1.45.96-1.el9.x86_64
libguestfs-1.46.1-2.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
# virt-v2v -i libvirt -ic xen+ssh://root@<xen_server_ip>/ -o null xen-hvm-rhel7.8-block -v -x
virt-v2v: virt-v2v 1.45.96rhel=9,release=1.el9 (x86_64)
libvirt version: 7.10.0
libvirt xml is:
<domain type='xen'>
  <name>xen-hvm-rhel7.8-block</name>
  <uuid>1090a4c1-f311-f2c1-5b5e-63ced0b6677c</uuid>
  <memory>1048576</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='xenfv'>hvm</type>
    <loader>/usr/lib/xen/boot/hvmloader</loader>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
    <disk type='block' device='disk'>
      <driver name='phy'/>
      <source dev='/dev/vg-block/lvtest'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='phy'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <interface type='bridge'>
      <mac address='00:16:3e:20:0f:df'/>
      <source bridge='virbr0'/>
      <script path='vif-bridge'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target port='0'/>
    </console>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
  </devices>
</domain>

virt-v2v: error: internal error: assertion failed at input_xen_ssh.ml, line 
91, char 9
Unix.Unix_error(Unix.ENOENT, "unlink", "/tmp/v2v.rUOjV7/in0")
rm -rf '/tmp/v2v.rUOjV7'

Actual results:
As description.

Expected results:
The error message should be more understandable.

Additional info:
The error message in rhel8 is as below:

virt-v2v: error: guest disk sda appears to be zero bytes in size.

There could be several reasons for this:

Check that the guest doesn't really have a zero-sized disk.  virt-v2v 
cannot convert such a guest.

If you are converting a guest from an ssh source and the guest has a disk 
on a block device (eg. on a host partition or host LVM LV), then 
conversions of this type are not supported.  See the virt-v2v-input-xen(1) 
manual for a workaround.

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

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

Comment 1 Richard W.M. Jones 2022-01-18 11:44:32 UTC
This is actually a regression in modular virt-v2v.

Comment 5 tingting zheng 2022-01-19 03:06:31 UTC
I can reproduce this bug with:
virt-v2v-1:1.45.96-1.el9.x86_64

Test with:
virt-v2v-1.45.97-1.el9.x86_64

# virt-v2v -i libvirt -ic xen+ssh://root@<xen_server_ip> -o null xen-hvm-rhel7.8-block -v -x
virt-v2v: virt-v2v 1.45.97rhel=9,release=1.el9 (x86_64)
libvirt version: 8.0.0
libvirt xml is:
<domain type='xen'>
  <name>xen-hvm-rhel7.8-block</name>
  <uuid>1090a4c1-f311-f2c1-5b5e-63ced0b6677c</uuid>
  <memory>1048576</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='xenfv'>hvm</type>
    <loader>/usr/lib/xen/boot/hvmloader</loader>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
    <disk type='block' device='disk'>
      <driver name='phy'/>
      <source dev='/dev/vg-block/lvtest'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='phy'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <interface type='bridge'>
      <mac address='00:16:3e:20:0f:df'/>
      <source bridge='virbr0'/>
      <script path='vif-bridge'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target port='0'/>
    </console>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
  </devices>
</domain>

virt-v2v: error: input from xen over ssh does not support disks stored on 
remote block devices.  See virt-v2v-input-xen(1) section "Xen or ssh 
conversions from block devices".
Unix.Unix_error(Unix.ENOENT, "unlink", "/tmp/v2v.ZinjXm/in0")
rm -rf '/tmp/v2v.ZinjXm'

The above error info has been improved,so move the bug to VERIFIED.

Comment 7 errata-xmlrpc 2022-05-17 13:41:56 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 (new packages: virt-v2v), 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/RHEA-2022:2566