(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.
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).
Patch posted: https://www.redhat.com/archives/libguestfs/2012-March/msg00089.html
Upstream in libguestfs 1.17.18.