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 858126 - virt-inspector fail to work with some windows guests
Summary: virt-inspector fail to work with some windows guests
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-18 03:13 UTC by Mohua Li
Modified: 2013-02-21 08:38 UTC (History)
3 users (show)

Fixed In Version: libguestfs-1.16.32-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 08:38:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Old Perl virt-inspector.pl (26.73 KB, text/plain)
2012-09-28 07:38 UTC, Richard W.M. Jones
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0324 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2013-02-20 20:54:42 UTC

Description Mohua Li 2012-09-18 03:13:15 UTC
Description of problem:
as we need to support both virt-inspector & virt-inspector2
 in RHEL 6, so here it's, only occur on Win2008,Win7,Vista,

[root@dhcp-93-131 xen]# virt-inspector Win7-32-hvm.raw
cat: open: /boot.ini: No such file or directory at /usr/lib64/perl5/vendor_=
perl/Sys/Guestfs/Lib.pm line 648.

[root@dhcp-93-131 xen]# virt-inspector2 Win7-32-hvm.raw
<?xml version=3D"1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/sda1</root>
    <name>windows</name>
    <arch>i386</arch>
    <distro>windows</distro>
    <product_name>Windows 7 Ultimate</product_name>
    <product_variant>Client</product_variant>
    <major_version>6</major_version>
    <minor_version>1</minor_version>
    <windows_systemroot>/Windows</windows_systemroot>
    <windows_current_control_set>ControlSet001</windows_current_control_set>
    <hostname>REDHATQ-3EEUM3L</hostname>
    <format>installed</format>
    <mountpoints>
      <mountpoint dev=3D"/dev/sda1">/</mountpoint>
    </mountpoints>
    <filesystems>
      <filesystem dev=3D"/dev/sda1">
        <type>ntfs</type>
        <label>OS_Install</label>
        <uuid>642EE3852EE34E9C</uuid>
      </filesystem>
    </filesystems>
    <drive_mappings>
      <drive_mapping name=3D"C">/dev/sda1</drive_mapping>
    </drive_mappings>
    <applications>
      <application>
        <name>Red Hat Paravirtualized Xen Drivers for Windows(R)</name>
        <display_name>Red Hat Paravirtualized Xen Drivers for Windows(R) 1.
3.13</display_name>
        <version>1.3.13</version>
        <publisher>Red Hat, Inc.</publisher>
        <url>http://www.redhat.com</url>
      </application>
    </applications>
  </operatingsystem>
</operatingsystems>
                                                                           
                                                                           
                                                     

Version-Release number of selected component (if applicable):
libguestfs-1.16.30-2.el6
libguestfs-tools-1.16.30-2.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.,virt-inspector $winimg
2.
3.
  
Actual results:


Expected results:


Additional info:
this is a regression problem from 6.3 build ,no problem on libguestfs-1.16.19-1.el6

Comment 3 Richard W.M. Jones 2012-09-28 07:38:01 UTC
Created attachment 618473 [details]
Old Perl virt-inspector.pl

I can reproduce this upstream, using the old Perl
virt-inspector program (attached).

# ./virt-inspector.pl /dev/vg_pin/Win7x32
download: /boot.ini: No such file or directory at /usr/lib64/perl5/vendor_perl/Sys/Guestfs/Lib.pm line 648.

Comment 4 Richard W.M. Jones 2012-09-28 07:47:04 UTC
This is caused by upstream commit:
https://github.com/libguestfs/libguestfs/commit/973581780d8a006f336684fef6762801402d775d

This changed the (previously undefined) behaviour of this API:
http://libguestfs.org/guestfs.3.html#guestfs_case_sensitive_path
so that if the path doesn't exist, a filename is now returned
whereas before it would return an undefined value.

This breaks the following test in old Perl inspection code:

sub _check_windows_root
{
#...
    my $boot_ini = resolve_windows_path ($g, "/boot.ini");
    $r->{boot_ini} = $boot_ini;
#...
    if (defined $r->{boot_ini}) {    # <--- here

Comment 6 Richard W.M. Jones 2012-09-28 12:15:22 UTC
Second patch had a mistake, updated here:
https://www.redhat.com/archives/libguestfs/2012-September/msg00157.html

Comment 7 Richard W.M. Jones 2012-09-28 13:57:07 UTC
Upstream, the commits needed are:
5feec6b9af33b6d532e86cac353a69bc972aa970
8dc4ed535f01e2334f48e5f69931e76af8339705

Comment 8 Richard W.M. Jones 2012-09-28 14:10:54 UTC
(In reply to comment #7)
> Upstream, the commits needed are:

Ignore previous comment.  The correct commits are:
55b7c4df7895b8c22d737723d857a9a63db69926
9ea6e9701461e594033999150f930cc4fafec4d2

Comment 10 Mohua Li 2012-11-07 07:30:14 UTC
libguestfs-1.16.32-2.el6.x86_64,



[root@station2 xen]# virt-inspector Win7-32-hvm.raw
windows i386 6.1 (Windows 7 Ultimate) on /dev/sda1:
  Mountpoints:
    /dev/sda1                      /
  Filesystems:
    /dev/sda1:
      type: ntfs
      content: windows-root
  Applications:
[root@station2 xen]# virt-inspector2 Win7-32-hvm.raw
<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/sda1</root>
    <name>windows</name>
    <arch>i386</arch>
    <distro>windows</distro>
    <product_name>Windows 7 Ultimate</product_name>
    <product_variant>Client</product_variant>
    <major_version>6</major_version>
    <minor_version>1</minor_version>
    <windows_systemroot>/Windows</windows_systemroot>
    <windows_current_control_set>ControlSet001</windows_current_control_set>
    <hostname>REDHATQ-3EEUM3L</hostname>
    <format>installed</format>
    <mountpoints>
      <mountpoint dev="/dev/sda1">/</mountpoint>
    </mountpoints>
    <filesystems>
      <filesystem dev="/dev/sda1">
        <type>ntfs</type>
        <label>OS_Install</label>
        <uuid>642EE3852EE34E9C</uuid>
      </filesystem>
    </filesystems>
    <drive_mappings>
      <drive_mapping name="C">/dev/sda1</drive_mapping>
    </drive_mappings>
    <applications>
      <application>
        <name>Red Hat Paravirtualized Xen Drivers for Windows(R)</name>
        <display_name>Red Hat Paravirtualized Xen Drivers for Windows(R) 1.3.13</display_name>
        <version>1.3.13</version>
        <publisher>Red Hat, Inc.</publisher>
        <url>http://www.redhat.com</url>
      </application>
    </applications>
  </operatingsystem>
</operatingsystems>

Comment 12 errata-xmlrpc 2013-02-21 08:38:45 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.

http://rhn.redhat.com/errata/RHBA-2013-0324.html


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