inspect_os error with Win7 image
The error message: hivex_close: do_hivex_close: you must call 'hivex-open' first to initialize the hivex handle This is the process flow: g = guestfs_create (); guestfs_add_drive_opts (g, diskFile,GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",-1); guestfs_launch (g) char **roots = guestfs_inspect_os (g); guestfs_inspect_os returns NULL, guestfs_last_error(g) returns message above. And guestfs_last_errno(g) returns 0. However this same code works fine with a Server2008 image and an XP image. I copied the verbose output to pastebin: http://pastebin.com/U9Jb6JwH Suggestions?
On Fri, Dec 14, 2012 at 12:07:22PM -0500, Skippy VonDrake wrote:
The error message: hivex_close: do_hivex_close: you must call 'hivex-open' first to initialize the hivex handle
This is the process flow: g = guestfs_create (); guestfs_add_drive_opts (g, diskFile,GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",-1); guestfs_launch (g) char **roots = guestfs_inspect_os (g);
guestfs_inspect_os returns NULL, guestfs_last_error(g) returns message above. And guestfs_last_errno(g) returns 0.
However this same code works fine with a Server2008 image and an XP image.
I copied the verbose output to pastebin: http://pastebin.com/U9Jb6JwH
Suggestions?
It's definitely a bug. What would be more useful than the verbose output, would be just the trace output (ie. guestfs_set_trace (g, 1)). Also, which version of libguestfs? It looks like 1.19/1.20 ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On Fri, Dec 14, 2012 at 12:07:22PM -0500, Skippy VonDrake wrote:
The error message: hivex_close: do_hivex_close: you must call 'hivex-open' first to initialize the hivex handle
This is the process flow: g = guestfs_create (); guestfs_add_drive_opts (g, diskFile,GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",-1); guestfs_launch (g) char **roots = guestfs_inspect_os (g);
guestfs_inspect_os returns NULL, guestfs_last_error(g) returns message above. And guestfs_last_errno(g) returns 0.
However this same code works fine with a Server2008 image and an XP image.
I copied the verbose output to pastebin: http://pastebin.com/U9Jb6JwH
Suggestions?
There is also a bug in the code ... The attached patch (not tested) may fix it. However it would still be extremely useful to see the trace output because (a) it would confirm if this is the bug or not, and (b) for some reason it seems as if the SOFTWARE or SYSTEM registry in the Win7 guest cannot be opened, and I don't understand why that would be. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On Fri, Dec 14, 2012 at 09:56:20PM +0000, Richard W.M. Jones wrote:
(b) for some reason it seems as if the SOFTWARE or SYSTEM registry in the Win7 guest cannot be opened, and I don't understand why that would be.
In fact the clue to this was in the verbose output: hivex: /sysroot/Windows/System32/config/SOFTWARE: trailing garbage at end of file (at 0x245b000, after 8557 pages) This error means that when scanning the SOFTWARE registry file in this guest, we came across a page which was not marked with the 'hbin' header. As far as we know, this means the registry is really corrupt (or something odd has happened, such as it's been zero-padded). Since there's no official documentation for registries, we don't actually know if it is valid for completely empty pages to exist. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
participants (2)
-
Richard W.M. Jones -
Skippy VonDrake