Bug 803664 - libguestfs inspection fails on Windows XP: libguestfs: error: hivex: could not locate HKLM\SYSTEM\MountedDevices
libguestfs inspection fails on Windows XP: libguestfs: error: hivex: could no...
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:
Blocks: 803699
  Show dependency treegraph
 
Reported: 2012-03-15 07:45 EDT by Richard W.M. Jones
Modified: 2012-03-15 14:33 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 803699 (view as bug list)
Environment:
Last Closed: 2012-03-15 14:33:56 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 2012-03-15 07:45:51 EDT
(Reported by traxmac)

Description of problem:

[root@oc6835410804 images]# guestmount -a ../clone/Virtual_Client_for_Linux_KVM_Windows_XP.qcow2 -i --rw --trace mount/
libguestfs: trace: set_recovery_proc true
libguestfs: trace: set_recovery_proc = 0
libguestfs: trace: add_drive_opts "../clone/Virtual_Client_for_Linux_KVM_Windows_XP.qcow2"
libguestfs: trace: add_drive_opts = 0
libguestfs: trace: launch
libguestfs: trace: launch = 0
libguestfs: trace: list_partitions
libguestfs: trace: list_partitions = ["/dev/vda1"]
libguestfs: trace: vfs_type "/dev/vda1"
libguestfs: trace: vfs_type = "ntfs"
libguestfs: trace: inspect_os
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: list_devices
libguestfs: trace: list_devices = ["/dev/vda"]
libguestfs: trace: vfs_type "/dev/vda"
libguestfs: trace: vfs_type = ""
libguestfs: trace: mount_ro "/dev/vda" "/"
libguestfs: trace: mount_ro = -1 (error)
libguestfs: trace: list_partitions
libguestfs: trace: list_partitions = ["/dev/vda1"]
libguestfs: trace: vfs_type "/dev/vda1"
libguestfs: trace: vfs_type = "ntfs"
libguestfs: trace: mount_ro "/dev/vda1" "/"
libguestfs: trace: mount_ro = 0
libguestfs: trace: is_dir "/etc"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_dir "/bin"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_dir "/share"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_file "/grub/menu.lst"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/grub/grub.conf"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/hurd/console"
libguestfs: trace: is_file = 0
libguestfs: trace: is_dir "/log"
libguestfs: trace: is_dir = 0
libguestfs: trace: case_sensitive_path "/windows"
libguestfs: trace: case_sensitive_path = "/WINDOWS"
libguestfs: trace: case_sensitive_path "/WINDOWS/system32"
libguestfs: trace: case_sensitive_path = "/WINDOWS/system32"
libguestfs: trace: is_dir "/WINDOWS/system32"
libguestfs: trace: is_dir = 1
libguestfs: trace: case_sensitive_path "/WINDOWS/system32/config"
libguestfs: trace: case_sensitive_path = "/WINDOWS/system32/config"
libguestfs: trace: is_dir "/WINDOWS/system32/config"
libguestfs: trace: is_dir = 1
libguestfs: trace: case_sensitive_path "/WINDOWS/system32/cmd.exe"
libguestfs: trace: case_sensitive_path = "/WINDOWS/system32/cmd.exe"
libguestfs: trace: is_file "/WINDOWS/system32/cmd.exe"
libguestfs: trace: is_file = 1
libguestfs: trace: case_sensitive_path "/windows"
libguestfs: trace: case_sensitive_path = "/WINDOWS"
libguestfs: trace: case_sensitive_path "/WINDOWS/system32"
libguestfs: trace: case_sensitive_path = "/WINDOWS/system32"
libguestfs: trace: is_dir "/WINDOWS/system32"
libguestfs: trace: is_dir = 1
libguestfs: trace: case_sensitive_path "/WINDOWS/system32/config"
libguestfs: trace: case_sensitive_path = "/WINDOWS/system32/config"
libguestfs: trace: is_dir "/WINDOWS/system32/config"
libguestfs: trace: is_dir = 1
libguestfs: trace: case_sensitive_path "/WINDOWS/system32/cmd.exe"
libguestfs: trace: case_sensitive_path = "/WINDOWS/system32/cmd.exe"
libguestfs: trace: is_file "/WINDOWS/system32/cmd.exe"
libguestfs: trace: is_file = 1
libguestfs: trace: case_sensitive_path "/windows"
libguestfs: trace: case_sensitive_path = "/WINDOWS"
libguestfs: trace: case_sensitive_path "/WINDOWS/system32/cmd.exe"
libguestfs: trace: case_sensitive_path = "/WINDOWS/system32/cmd.exe"
libguestfs: trace: file_architecture "/WINDOWS/system32/cmd.exe"
libguestfs: trace: file "/WINDOWS/system32/cmd.exe"
libguestfs: trace: file = "PE32 executable for MS Windows (console) Intel 80386 32-bit"
libguestfs: trace: file_architecture = "i386"
libguestfs: trace: case_sensitive_path "/WINDOWS/system32/config/software"
libguestfs: trace: case_sensitive_path = "/WINDOWS/system32/config/software"
libguestfs: trace: filesize "/WINDOWS/system32/config/software"
libguestfs: trace: filesize = 17039360
libguestfs: trace: download "/WINDOWS/system32/config/software" "/dev/fd/3"
libguestfs: trace: download = 0
libguestfs: trace: case_sensitive_path "/WINDOWS/system32/config/system"
libguestfs: trace: case_sensitive_path = "/WINDOWS/system32/config/system"
libguestfs: trace: filesize "/WINDOWS/system32/config/system"
libguestfs: trace: filesize = 3932160
libguestfs: trace: download "/WINDOWS/system32/config/system" "/dev/fd/3"
libguestfs: trace: download = 0
libguestfs: error: hivex: could not locate HKLM\SYSTEM\MountedDevices
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: inspect_os = NULL (error)
libguestfs: trace: close
libguestfs: trace: internal_autosync
libguestfs: trace: internal_autosync = 0
libguestfs: trace: kill_subprocess
libguestfs: trace: kill_subprocess = 0

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

libguestfs 1.16.10 from RHEL 6.3 (but we don't think it
is specific to RHEL)

I have asked for the SYSTEM hive from the VM.
Comment 2 Richard W.M. Jones 2012-03-15 08:39:00 EDT
The problem is pretty clear from the SYSTEM hive supplied:
There is no HKLM\SYSTEM\MountedDevices key present at all.
Perhaps sysprep removes this key.

Inspection should be changed so that if this key is missing
it is not an error (but the drive letters will not be populated).
Comment 3 Richard W.M. Jones 2012-03-15 09:57:37 EDT
Patch posted:
https://www.redhat.com/archives/libguestfs/2012-March/msg00089.html
Comment 4 Richard W.M. Jones 2012-03-15 14:33:56 EDT
Upstream in libguestfs 1.17.18.

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