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 1359652

Summary: Fail to inspect Windows ISO file
Product: Red Hat Enterprise Linux 7 Reporter: Bin Han <bihan>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: leiwang, ptoscano, wshi, xchen
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libguestfs-1.32.6-3.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 18:02:55 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:
Attachments:
Description Flags
inspect-os log none

Description Bin Han 2016-07-25 08:47:34 UTC
Created attachment 1183635 [details]
inspect-os log

Description of problem:
Fail to inspect Windows ISO file

Version-Release number of selected component (if applicable):
kernel 3.10.0-461.el7.x86_64
libguestfs-1.32.6-1.el7.x86_64
libosinfo-0.3.0-1.el7.x86_64


How reproducible:
Always

Steps to Reproduce:
1. download a Windows install ISO file.
2. Inspect the Windows iso as following:
#guestfish

><fs> add-ro en_windows_7_ultimate_with_sp1_x86_dvd_u_677460.iso
><fs> run
><fs> inspect-os
><fs>


Actual results:
At step2
><fs> inspect-os
Nothing output

Expected results:
At Step2
><fs> inspect-os
/dev/sda


Additional info:
1. If open debug mode to run guestfish -v -x , you can find this info "libguestfs: osinfo: /usr/share/libosinfo/db/oses: No such file or directory" after execute inspect-os which is shown as below.
#guestfish -v -x
><fs> add-ro en_windows_7_ultimate_with_sp1_x86_dvd_u_677460.iso
><fs> run
><fs> inspect-os
------debug info is omitted------------
libguestfs: osinfo: /usr/share/libosinfo/db/oses: No such file or directory
libguestfs: trace: mount_ro "/dev/sda" "/"
------debug info is omitted------------
><fs>

2.find windows xml file in other directory, so do the follow steps to copy the windows xml file into the place /usr/share/libosinfo/db/oses
   mkdir /usr/share/libosinfo/db/oses
   cp /usr/share/libosinfo/db/os/microsoft.com/win-7.xml /usr/share/libosinfo/db/oses/windows.xml
  After the windows.xml is in the right place, execute the command "inspect-os" again. It will get the right result.

Comment 2 Pino Toscano 2016-07-25 15:48:34 UTC
This is due to the different layout on disk of the (private) libosinfo database.
I just sent a patch to take care of the current new layout of libosinfo, and also of the upcoming shared osinfo database.

  https://www.redhat.com/archives/libguestfs/2016-July/msg00224.html

Comment 3 Pino Toscano 2016-07-26 11:20:40 UTC
Fixed with
https://github.com/libguestfs/libguestfs/commit/c2ae46a9ebcf9e6bd0037a5cc895095a255c1a24
which is in libguestfs >= 1.33.46.

Comment 5 Bin Han 2016-08-01 07:58:14 UTC
Verified with the packages:
libguestfs-1.32.6-2.el7.x86_64.rpm

Verify steps:
1. download a Windows install ISO file.
2. Inspect the Windows iso as following:
#guestfish

><fs> add-ro en_windows_7_ultimate_with_sp1_x86_dvd_u_677460.iso
><fs> run
><fs> inspect-os
/dev/sda
><fs> 

Get the right result. So verified.

Comment 6 Richard W.M. Jones 2016-08-03 11:19:26 UTC
Sorry, got to set this one back to ASSIGNED.

Pino added another fix for this:
https://github.com/libguestfs/libguestfs/commit/12c05d5c364c222854217c18a26d056ac2214b11

so I will include this in the next build and we need to retest this.

Comment 8 Xianghua Chen 2016-08-04 08:00:17 UTC
Verified with the packages:
libguestfs-1.33.46-1.el7.x86_64

Verify steps:
1. download a Windows install ISO file.
2. Inspect the Windows iso as following:
# guestfish -a en_windows_7_ultimate_with_sp1_x64_dvd_u_677332.iso run : inspect-os
/dev/sda


So verified.

Comment 10 errata-xmlrpc 2016-11-03 18:02:55 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://rhn.redhat.com/errata/RHSA-2016-2576.html