RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1240276 - Add checks to ensure libguestfs-winsupport functionality only available to virt-v2v and virt-p2v
Summary: Add checks to ensure libguestfs-winsupport functionality only available to vi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.2
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1240278 1243493
TreeView+ depends on / blocked
 
Reported: 2015-07-06 12:28 UTC by Richard W.M. Jones
Modified: 2019-09-12 08:36 UTC (History)
12 users (show)

Fixed In Version: libguestfs-1.28.1-1.47.el7
Doc Type: Enhancement
Doc Text:
The libguestfs-winsupport subpackage can now be used for performing virtual-to-virtual (virt-v2v) and physical-to-virtual (virt-p2v) conversions of Windows guests. However, with several exceptions such as virt-win-reg, it is no longer possible to use most libguestfs tools on Windows disk images.
Clone Of:
: 1243493 (view as bug list)
Environment:
Last Closed: 2015-11-19 07:02:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2183 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-11-19 08:18:42 UTC

Description Richard W.M. Jones 2015-07-06 12:28:12 UTC
Description of problem:

Modify libguestfs so that libguestfs-winsupport functionality can
only be used by the virt-v2v and virt-p2v programs.

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

libguestfs-1.28.1-1.44.el7

Steps to Reproduce:

Commands such as:

  guestfish -a windows.img -i
  virt-inspector windows.img

must *fail* to work.

However virt-v2v and virt-p2v must continue to be able to
convert Windows guests.

Comment 3 zhoujunqin 2015-07-08 08:48:07 UTC
I can reproduce this issue with package:
libguestfs-1.28.1-1.44.el7.x86_64
libvirt-1.2.17-1.el7.x86_64
virt-v2v-1.28.1-1.44.el7.x86_64

Steps:
# guestfish -a /var/lib/libvirt/images/win7.qcow2 -i
guestfish: no operating system was found on this disk

If using guestfish '-i' option, remove this option and instead
use the commands 'run' followed by 'list-filesystems'.
You can then mount filesystems you want by hand using the
'mount' or 'mount-ro' command.

If using guestmount '-i', remove this option and choose the
filesystem(s) you want to see by manually adding '-m' option(s).
Use 'virt-filesystems' to see what filesystems are available.

If using other virt tools, this disk image won't work
with these tools.  Use the guestfish equivalent commands
(see the virt tool manual page).

RHEL notice
-------------
libguestfs will return this error for Microsoft Windows guests if the
separate 'libguestfs-winsupport' package is not installed. If the
guest is running Microsoft Windows, please try again after installing
'libguestfs-winsupport'.

# virt-inspector /var/lib/libvirt/images/win7.qcow2 
<?xml version="1.0"?>
<operatingsystems/>

Then try to verify this bug with new build:
libguestfs-1.28.1-1.46.el7.x86_64
virt-v2v-1.28.1-1.46.el7.x86_64
libguestfs-xfs-1.28.1-1.46.el7.x86_64
libguestfs-winsupport-7.2-1.el7.x86_64

# virt-inspector /var/lib/libvirt/images/win7.qcow2 
<?xml version="1.0"?>
<operatingsystems/>

# guestfish -a /var/lib/libvirt/images/win7.qcow2 -i
guestfish: no operating system was found on this disk
--------------------------------^ win7.qcow2 is a disk with operating system, is it a bug? 

If using guestfish '-i' option, remove this option and instead
use the commands 'run' followed by 'list-filesystems'.
You can then mount filesystems you want by hand using the
'mount' or 'mount-ro' command.

If using guestmount '-i', remove this option and choose the
filesystem(s) you want to see by manually adding '-m' option(s).
Use 'virt-filesystems' to see what filesystems are available.

If using other virt tools, this disk image won't work
with these tools.  Use the guestfish equivalent commands
(see the virt tool manual page).

# virt-v2v -i disk /var/lib/libvirt/images/win7.qcow2 -o local  -os /var/tmp/
[   0.0] Opening the source -i disk /var/lib/libvirt/images/win7.qcow2
[   1.0] Creating an overlay to protect the source from being modified
[   1.0] Opening the overlay
[   3.0] Initializing the target -o local -os /var/tmp/
[   3.0] Inspecting the overlay
[   4.0] Checking for sufficient free disk space in the guest
[   4.0] Estimating space required on target for each disk
[   4.0] Converting Windows 7 Ultimate to run on KVM
virt-v2v: This guest has virtio drivers installed.
[   6.0] Mapping filesystem data to avoid copying unused and blank areas
[   7.0] Closing the overlay
[   7.0] Checking if the guest needs BIOS or UEFI to boot
[   7.0] Copying disk 1/1 to /var/tmp/win7-sda (qcow2)
    (100.00/100%)
[ 261.0] Creating output metadata
[ 261.0] Finishing off

Result: Conversion finished with no error and guest can boot up.


Hi rjones, please help have a look, are above steps enough to reproduce and verify this bug, thanks.

Comment 4 Richard W.M. Jones 2015-07-08 09:17:02 UTC
(In reply to zhoujunqin from comment #3)
> Then try to verify this bug with new build:
> libguestfs-1.28.1-1.46.el7.x86_64
> virt-v2v-1.28.1-1.46.el7.x86_64
> libguestfs-xfs-1.28.1-1.46.el7.x86_64
> libguestfs-winsupport-7.2-1.el7.x86_64
> 
> # virt-inspector /var/lib/libvirt/images/win7.qcow2 
> <?xml version="1.0"?>
> <operatingsystems/>
> 
> # guestfish -a /var/lib/libvirt/images/win7.qcow2 -i
> guestfish: no operating system was found on this disk
> --------------------------------^ win7.qcow2 is a disk with operating
> system, is it a bug? 

No this is not a bug.  libguestfs-winsupport is supposed to
only be usable from virt-v2v and virt-p2v.  You can no longer
use it from guestfish or other virt-* tools.  The behaviour
above is correct.

Comment 5 zhoujunqin 2015-07-08 09:29:21 UTC
(In reply to Richard W.M. Jones from comment #4)
> (In reply to zhoujunqin from comment #3)
> > Then try to verify this bug with new build:
> > libguestfs-1.28.1-1.46.el7.x86_64
> > virt-v2v-1.28.1-1.46.el7.x86_64
> > libguestfs-xfs-1.28.1-1.46.el7.x86_64
> > libguestfs-winsupport-7.2-1.el7.x86_64
> > 
> > # virt-inspector /var/lib/libvirt/images/win7.qcow2 
> > <?xml version="1.0"?>
> > <operatingsystems/>
> > 
> > # guestfish -a /var/lib/libvirt/images/win7.qcow2 -i
> > guestfish: no operating system was found on this disk
> > --------------------------------^ win7.qcow2 is a disk with operating
> > system, is it a bug? 
> 
> No this is not a bug.  libguestfs-winsupport is supposed to
> only be usable from virt-v2v and virt-p2v.  You can no longer
> use it from guestfish or other virt-* tools.  The behaviour
> above is correct.

Thanks for your quick reply, i understand it now.
According to Comment 3 and Comment 4, move this bug from ON_QA to VERIFIED.

Comment 18 errata-xmlrpc 2015-11-19 07:02:28 UTC
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.

https://rhn.redhat.com/errata/RHBA-2015-2183.html


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