Bug 674130 - Inspection code fails for Windows guest with two disks
Inspection code fails for Windows guest with two disks
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On: 672827
Blocks: 679354
  Show dependency treegraph
 
Reported: 2011-01-31 13:08 EST by Richard W.M. Jones
Modified: 2011-03-28 07:17 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-03-28 05:40:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2011-01-31 13:08:04 EST
Description of problem:

See:
https://www.redhat.com/archives/virt-tools-list/2011-January/msg00118.html

The inspection code gets confused if two partitions
contains what it thinks are Windows root filesystems.
Essentially the Windows root detection test is wrong:

http://git.annexia.org/?p=libguestfs.git;a=blob;f=src/inspect.c;h=ac2050c69491aee8dad3642c6a973275495ad823;hb=HEAD#l368
http://git.annexia.org/?p=libguestfs.git;a=blob;f=perl/lib/Sys/Guestfs/Lib.pm;h=393eb8adb21dd4e3d40f4394a717f0d679d1dd3b;hb=HEAD#l486

Version-Release number of selected component (if applicable):

libguestfs in RHEL 6.0
Comment 1 Richard W.M. Jones 2011-03-22 06:34:35 EDT
This was fairly simple to reproduce.  First I installed
Windows 7 on a VM with two virtual disks (12 GB + 512 MB).
After installation I formatted the second small disk.
Then I downloaded Firefox and asked it to install on
to the second drive (E:).  Firefox's installer created
E:\Program Files\...

This broke the core inspection code: it tried to find an
operating system on the second disk (because it thought the
presence of "/Program Files" meant it was a Windows root).
It failed to determine the %SYSTEMROOT% of this second
disk.  The error message was:

# virt-inspector Win7x32TwoDisks
libguestfs: error: cannot resolve Windows %SYSTEMROOT%
virt-inspector: no operating system could be detected inside this disk image.

This may be because the file is not a disk image, or is not a virtual machine
image, or because the OS type is not understood by libguestfs.
[...]

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