+++ 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: 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):
The systemroot directory is c:\WINDOWS
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.
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.
Windows guest has an HP recovery partition.
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.
libguestfs now recognizes the special HP recovery partition.
libguestfs, virt tools, virt-v2v, and virt-p2v can now be used on these guests.
Reproduced accord to comment 12 on libguestfs-1.7.17-26, verified on libguestfs-1.16.19-1.
1. Make sure libguestfs-winsupport is installed.
2. Take any Windows guest.
3. Create a second disk (called 'test1.img') using these commands:
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
At step 4, following error message shows up.
libguestfs: error: cannot resolve Windows %SYSTEMROOT%
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 /
According to above result, change this bug to VERIFIED.
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.