Bug 888059

Summary: guestfs_inspect_os() fails with Win7 image with registry in "non-pristine" state
Product: [Community] Virtualization Tools Reporter: skippyvondrake
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: dyasny, mbooth
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-18 08:14:51 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
see "Additional info" above for steps taken to create debug log. none

Description skippyvondrake 2012-12-17 22:56:39 UTC
Created attachment 665162 [details]
see "Additional info" above for steps taken to create debug log.

Description of problem:
Windows 7 image can be booted in Xen, but upon startup (in Xen) a "Registry Recovery... recovery was successful" message appears. The libguestfs cannot digest such "impure" registry entries.

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


How reproducible: Very - with my specific image. I may be able to provide it. (about 20GB).


Steps to Reproduce:
1. load image with guestfs and call guestfs_inspect_os()
2.
3.
  
Actual results:
guestfs_inspect_os fails.

Expected results:
guestfs_inspect_os not fail?

Additional info:
The debug info provide was obtained using 'guestfs_set_verbose(g,1)' in the application code. AND by hardcoding the "flags" in hivex.c, function 'do_hivex_open()' of the libguestfs sources (1.19.61). Flags is set to include HIVEX_OPEN_VERBOSE and HIVEX_OPEN_DEBUG.

Comment 1 Richard W.M. Jones 2012-12-18 08:14:51 UTC
The registry is faulty:
hivex: /sysroot/Windows/System32/config/SOFTWARE: trailing garbage at end of file (at 0x245b000, after 8557 pages)

The problem with libguestfs failing when presented with
a bad registry has already been fixed.
https://github.com/libguestfs/libguestfs/commit/95df8a7c0cedb0daf8f5318fbeb931f6a67e6286