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 1673280 - virt-inspector fails with "error: int_of_string" on a Linux image when /etc/fstab contains a partionless device [rhel-7.6.z]
Summary: virt-inspector fails with "error: int_of_string" on a Linux image when /etc/f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.7
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: YongkuiGuo
URL:
Whiteboard:
Depends On: 1672951
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-07 08:51 UTC by RAD team bot copy to z-stream
Modified: 2022-03-13 16:57 UTC (History)
5 users (show)

Fixed In Version: libguestfs-1.38.2-12.el7_6.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1672951
Environment:
Last Closed: 2019-03-13 18:46:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0513 0 None None None 2019-03-13 18:46:19 UTC

Description RAD team bot copy to z-stream 2019-02-07 08:51:18 UTC
This bug has been copied from bug #1672951 and has been proposed to be backported to 7.6 z-stream (EUS).

Comment 3 YongkuiGuo 2019-02-12 02:28:22 UTC
Verified with package:
libguestfs-1.38.2-12.el7_6.2.x86_64

Steps:

1. Download the condor-fedora-24-64-master-2016080801.qcow2 image from the link: https://platform.swampinabox.org/platform-images/condor-fedora-24-64-master-2016080801.qcow2.gz
2. 
# virt-inspector -a condor-fedora-24-64-master-2016080801.qcow2
libguestfs: error: mount_ro: mount_ro_stub: /dev/vdb: expecting a device name
libguestfs: error: mount_ro: mount_ro_stub: /dev/vdc: expecting a device name
virt-inspector: some filesystems could not be mounted (ignored)
<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/vg0/lv_root</root>
    <name>linux</name>
    <arch>x86_64</arch>
    <distro>fedora</distro>
    <product_name>Fedora 24 (Twenty Four)</product_name>
    <major_version>24</major_version>
    <minor_version>0</minor_version>
    <package_format>rpm</package_format>
    <package_management>dnf</package_management>
    <hostname>localhost.localdomain</hostname>
    <osinfo>fedora24</osinfo>
    <mountpoints>
      <mountpoint dev="/dev/vg0/lv_root">/</mountpoint>
      <mountpoint dev="/dev/sda2">/boot</mountpoint>
      <mountpoint dev="/dev/sdb">/mnt/in</mountpoint>
      <mountpoint dev="/dev/sdc">/mnt/out</mountpoint>
    </mountpoints>
    <filesystems>
      <filesystem dev="/dev/sda2">
        <type>ext4</type>
        <uuid>4c029e08-3e60-4227-8a5b-de2c500daf08</uuid>
      </filesystem>
      <filesystem dev="/dev/sdb"/>
      <filesystem dev="/dev/sdc"/>
      <filesystem dev="/dev/vg0/lv_root">
        <type>ext4</type>
        <uuid>36ef4986-e9a4-4177-b251-455618165972</uuid>
      </filesystem>
      <filesystem dev="/dev/vg0/lv_swap">
        <type>swap</type>
        <uuid>299e4b2f-4946-4b48-97ce-6b6afd4735e7</uuid>
      </filesystem>
    </filesystems>
...

The virt-inspector command can inspect the linux image when /etc/fstab contains a partionless device. Verified this bug.

Comment 4 mxie@redhat.com 2019-02-12 06:40:29 UTC
Reproduce the bug with builds:
virt-v2v-1.38.2-12.el7_6.1.x86_64
libguestfs-1.38.2-12.el7_6.1.x86_64

Steps to reproduce:
1.Add one disk to a linux guest on VMware host, then create partition for the new added disk and format the disk as ext3

2.Create /mnt/in and add below info in /etc/fstab (the new disk has no partition number)
# cat /etc/fstab
....
/dev/mapper/rhel-root   /                       xfs     defaults        0 0
UUID=3c069c5d-9497-4d39-808c-011354d29760 /boot                   xfs     defaults        0 0
/dev/mapper/rhel-swap   swap                    swap    defaults        0 0
/dev/sdb        /mnt/in                ext3        defaults        0 0
      

3.Reboot the guest, guest will boot into emergency mode

4.Power off guest, then use virt-v2v to convert it to rhv
# virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1  --password-file /tmp/passwd esx6.7-rhel7.6-x86_64-fstab-partionless -o rhv -os 10.66.144.40:/home/nfs_export
[   0.0] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel7.6-x86_64-fstab-partionless
[   3.9] Creating an overlay to protect the source from being modified
[   5.3] Initializing the target -o rhv -os 10.66.144.40:/home/nfs_export
[   5.6] Opening the overlay
[  45.4] Inspecting the overlay
virt-v2v: error: libguestfs error: inspect_os: int_of_string

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

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


Verify the bug with builds:
virt-v2v-1.38.2-12.el7_6.2.x86_64
libguestfs-1.38.2-12.el7_6.2.x86_64

Steps:
1.Convert above guest by virt-v2v again
# virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1  --password-file /tmp/passwd esx6.7-rhel7.6-x86_64-fstab-partionless -o rhv -os 10.66.144.40:/home/nfs_export
[   0.0] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel7.6-x86_64-fstab-partionless
[   4.2] Creating an overlay to protect the source from being modified
[   5.7] Initializing the target -o rhv -os 10.66.144.40:/home/nfs_export
[   6.2] Opening the overlay
[  28.8] Inspecting the overlay
virt-v2v: warning: mount: mount exited with status 32: mount: /dev/sdb is 
write-protected, mounting read-only
mount: unknown filesystem type '(null)' (ignored)
[ 216.5] Checking for sufficient free disk space in the guest
[ 216.5] Estimating space required on target for each disk
[ 216.5] Converting Red Hat Enterprise Linux Server 7.6 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[1443.4] Mapping filesystem data to avoid copying unused and blank areas
[1453.1] Closing the overlay
[1453.6] Checking if the guest needs BIOS or UEFI to boot
[1453.6] Assigning disks to buses
[1453.6] Copying disk 1/2 to /tmp/v2v.8vzNy7/c980b640-cb59-47f7-a0fe-90312d33deae/images/c9412985-5146-4db6-8fc5-7796771199d8/cf6212ac-7e65-452d-a81f-907aefdfd991 (raw)
    (100.00/100%)
[2094.6] Copying disk 2/2 to /tmp/v2v.8vzNy7/c980b640-cb59-47f7-a0fe-90312d33deae/images/ac4552f7-ad1f-4cdd-9543-52d8af036eb7/64d2aa7d-0761-4f8a-8166-0ebee5cbeb7c (raw)
    (100.00/100%)
[2176.4] Creating output metadata
[2176.5] Finishing off

2.After finishing conversion,import guest from export domain to data domain and power on, guest will boot into emergency mode

Comment 6 errata-xmlrpc 2019-03-13 18:46:19 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, 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/RHBA-2019:0513


Note You need to log in before you can comment on or make changes to this bug.