Bug 729076 - libguestfs confuses Hp_recovery partition with Windows root filesystem
libguestfs confuses Hp_recovery partition with Windows root filesystem
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
:
Depends On: libguestfs_rebase6.3 729075
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-08 12:44 EDT by Richard W.M. Jones
Modified: 2012-06-20 02:59 EDT (History)
12 users (show)

See Also:
Fixed In Version: libguestfs-1.16.2-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: Windows guest has an HP recovery partition. Consequence: libguestfs confuses the HP recovery partition with an ordinary Windows partition, so thinks the guest is dual-boot. Various virt tools including virt-v2v and virt-p2v refuse to deal with multi-boot guests, so they wouldn't work. Fix: libguestfs now recognizes the special HP recovery partition. Result: libguestfs, virt tools, virt-v2v, and virt-p2v can now be used on these guests.
Story Points: ---
Clone Of: 729075
Environment:
Last Closed: 2012-06-20 02:59:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2011-08-08 12:44:54 EDT
+++ This bug was initially created as a clone of Bug #729075 +++

Description of problem:

This error occurred during a routine virt-p2v conversion:

Aug  8 11:10:16 virtp2v-server kernel: [ 9943.068103] CE: hpet increased min_delta_ns to 7500 nsec
Aug  8 12:30:16 virtp2v-server kernel: [14743.560615] kvm: 22274: cpu0 unhandled wrmsr: 0x198 data 0
Aug  8 12:30:30 virtp2v-server virt-v2v[3368]: FATAL: inspect_os: cannot resolve Windows %SYSTEMROOT% at /usr/share/perl5/Sys/VirtConvert/GuestfsHandle.pm line 187, <> line 8.#012 at /usr/bin/virt-p2v-server line 397

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

libguestfs 1.8.9

The systemroot directory is c:\WINDOWS
Comment 1 Richard W.M. Jones 2011-08-08 13:01:54 EDT
The root cause appears to be because the system has an
HP_recovery partition (as drive D:)  This contains files
with names like autoexec.bat and boot.ini which confuses
our windows root detection.
Comment 7 Richard W.M. Jones 2012-04-26 09:18:58 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:
Windows guest has an HP recovery partition.

Consequence:
libguestfs confuses the HP recovery partition with an ordinary Windows partition, so thinks the guest is dual-boot.  Various virt tools including virt-v2v and virt-p2v refuse to deal with multi-boot guests, so they wouldn't work.

Fix:
libguestfs now recognizes the special HP recovery partition.

Result:
libguestfs, virt tools, virt-v2v, and virt-p2v can now be used on these guests.
Comment 13 Yuyu Zhou 2012-05-08 22:21:31 EDT
Reproduced accord to comment 12 on libguestfs-1.7.17-26, verified on libguestfs-1.16.19-1.

Steps:
1. Make sure libguestfs-winsupport is installed.
2. Take any Windows guest.
3. Create a second disk (called 'test1.img') using these commands:
cd /tmp
guestfish -N fs:ntfs -m /dev/sda1 touch /AUTOEXEC.BAT
4. Try to inspect the guest + the second disk:
guestfish --ro -i -a /home/data/images/Win2008r2-64-hvm.raw -a /tmp/test1.img

Test result:
On  libguestfs-1.7.17-26:
At step 4, following error message shows up.
libguestfs: error: cannot resolve Windows %SYSTEMROOT%

On libguestfs-1.16.19-1:
At step4, Windows guest is found and mounted correctly as following:

# guestfish --ro -i -a /home/data/images/Win2008r2-64-hvm.raw -a /tmp/test1.img

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

Operating system: Windows Server 2008 R2 Standard
/dev/vda1 mounted on /

><fs>

According to above result, change this bug to VERIFIED.
Comment 15 errata-xmlrpc 2012-06-20 02:59:43 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0774.html

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