Bug 672825

Summary: libguestfs is not aware of the Windows Recovery Console extra partition
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 672824 Environment:
Last Closed: 2011-03-24 11:51:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 672824, 673066    

Description Richard W.M. Jones 2011-01-26 14:45:43 UTC
libguestfs core inspection code should be aware of the
Windows Recovery Console and mark it specially.  This
would allow tools like virt-v2v to make allowances for this.

+++ This bug was initially created as a clone of Bug #672824 +++

Description of problem:

https://www.redhat.com/archives/virt-tools-list/2011-January/thread.html#00058

If a Windows <= 2003 guest has the Windows Recovery Console
installed, then the perl inspection code detects this as an
extra instance of Windows.  Since virt-v2v does not work with
multiboot operating systems, the conversion fails with the
error:

 virt-v2v: multiboot operating systems are not supported by virt-v2v

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

0.7.1(?)

How reproducible:

Always.

Steps to Reproduce:
1. Install Windows Recovery Console to the guest hard disk.
2. Try virt-v2v conversion.
3.
  
Actual results:

virt-v2v/libguestfs thinks the guest is multiboot and fails.

Expected results:

virt-v2v should ignore the Recovery Console partition and
convert only the main partition.  It should probably warn that
the Recovery Console has not been converted and must be
reinstalled.

Additional info:

Comment 1 Richard W.M. Jones 2011-03-22 10:30:19 UTC
I couldn't reproduce this with Windows XP.

Except when the install CD (ie. ISO) was attached to
the virtual machine, in which case it sees the install
CD as a separate Windows installation.  We should
probably have it just ignore CD devices / ISOs.

When I removed the CD using virsh edit, only a single
operating system was observed by [new] virt-inspector.

Some background information:

In Windows XP the Recovery Console can be installed off
the CD (see http://support.microsoft.com/kb/216417).  Doing
this does not require a separate partition.  It creates
a C:\CMDCONS directory containing a load of *.SYS and *.DLL
files, and it updates BOOT.INI with an extra entry, see
the final line here:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
C:\CMDCONS\BOOTSECT.DAT="Microsoft Windows Recovery Console" /cmdcons

Even the old Perl code which tried to parse boot.ini
ought to parse this correctly.  It should only look
at the default=... line.  The new C inspection code
doesn't look inside boot.ini at all.