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 1145916 - virt-v2v fails to convert win7 guest
Summary: virt-v2v fails to convert win7 guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-24 06:32 UTC by zhoujunqin
Modified: 2015-03-05 13:45 UTC (History)
7 users (show)

Fixed In Version: libguestfs-1.27.64-1.1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 13:45:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot for the two windows guest (88.51 KB, image/png)
2014-09-25 06:35 UTC, zhoujunqin
no flags Details
screenshot of win7 64 BSOD (57.14 KB, image/png)
2014-09-26 02:41 UTC, tingting zheng
no flags Details
screenshot of win7 32 BSOD (55.62 KB, image/png)
2014-09-26 02:42 UTC, tingting zheng
no flags Details
the log file when converting xen-hvm-win7-x86_64 using -v -x (105.16 KB, text/plain)
2014-09-26 03:21 UTC, zhoujunqin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0303 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-03-05 17:34:44 UTC

Description zhoujunqin 2014-09-24 06:32:57 UTC
Description of problem:
virt-v2v fails to convert win7 guest

Version-Release number of selected component (if applicable):
virt-v2v-1.27.53-1.1.el7.x86_64
libguestfs-1.27.53-1.1.el7.x86_64
libguestfs-winsupport-7.1-4.el7.x86_64
virtio-win-1.7.2-1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Prepare a windows guest.
# virsh -c xen+ssh://10.66.106.64 list --all
 Id    Name                           State
----------------------------------------------------
 -     xen-hvm-win7-x86_64            shut off

2. Use virt-v2v to convert guest from xen server.
# virt-v2v -ic xen+ssh://10.66.106.64 -os default xen-hvm-win7-x86_64 -of qcow2
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 xen-hvm-win7-x86_64
[  16.0] Creating an overlay to protect the source from being modified
[  30.0] Opening the overlay
[  48.0] Initializing the target -o libvirt -os default
[  48.0] Inspecting the overlay
[  54.0] Checking for sufficient free disk space in the guest
[  54.0] Estimating space required on target for each disk
[  54.0] Converting Windows 7 Ultimate to run on KVM
virt-v2v: error: libguestfs error: upload: /Windows/Drivers/VirtIO: Is a
directory

If reporting bugs, run virt-v2v with debugging enabled and include the
complete output:

  virt-v2v -v -x [...]


Actual results:
virt-v2v failes to convert win7 guest

Expected results:
virt-v2v can convert win7 guest successfully.

Additional info:
Also met this error When converting other kind windows guest:  Win2008R2, Win2008, Win2003

Comment 2 Richard W.M. Jones 2014-09-24 17:50:13 UTC
Should be fixed in >= 1.27.54:

https://github.com/libguestfs/libguestfs/commit/97b96af54c5fc47bca2ea8f87d179a8b4d9e5242

Comment 4 zhoujunqin 2014-09-25 06:33:59 UTC
I can reproduce this issue as bug description.
And try to verify with new build:

libguestfs-1.27.54-1.1.el7.x86_64
virt-v2v-1.27.54-1.1.el7.x86_64
libguestfs-winsupport-7.1-4.el7.x86_64
virtio-win-1.7.2-1.el7.noarch

steps:
1. Prepare a windows guest.
# virsh -c xen+ssh://10.66.106.64 list --all
 Id    Name                           State
----------------------------------------------------
 -     xen-hvm-win7-x86_64            shut off

2. Use virt-v2v to convert guest from xen server
# virt-v2v -ic xen+ssh://10.66.106.64 -os default xen-hvm-win7-x86_64 -of qcow2
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 xen-hvm-win7-x86_64
[  17.0] Creating an overlay to protect the source from being modified
[  35.0] Opening the overlay
[  57.0] Initializing the target -o libvirt -os default
[  57.0] Inspecting the overlay
[  63.0] Checking for sufficient free disk space in the guest
[  63.0] Estimating space required on target for each disk
[  63.0] Converting Windows 7 Ultimate to run on KVM
This guest has virtio drivers installed.
[  64.0] Mapping filesystem data to avoid copying unused and blank areas
[  67.0] Closing the overlay
[  67.0] Copying disk 1/1 to /var/lib/libvirt/images/xen-hvm-win7-x86_64-sda (qcow2)
    (100.00/100%)
[ 351.0] Creating output metadata
Pool default refreshed

Domain xen-hvm-win7-x86_64 defined from /tmp/v2vlibvirt88307e.xml

[ 352.0] Finishing off

Result: conversion is successful, but failed to login windows guest.
for xen-hvm-win7-x86_64 and xen-hvm-win2008r2-x86_64 they fails at the "Windows Error Recovery" page, for details please see screenshot, thanks.
So refer to the above comments,move the bug back to ASSIGNED.

Comment 5 zhoujunqin 2014-09-25 06:35:09 UTC
Created attachment 940982 [details]
screenshot for the two windows guest

Comment 6 Richard W.M. Jones 2014-09-25 16:01:56 UTC
Yes, unfortunately I am able to reproduce this.

Comment 7 tingting zheng 2014-09-26 02:41:43 UTC
Created attachment 941356 [details]
screenshot of win7 64 BSOD

Comment 8 tingting zheng 2014-09-26 02:42:12 UTC
Created attachment 941357 [details]
screenshot of win7 32 BSOD

Comment 9 tingting zheng 2014-09-26 02:42:48 UTC
For win 7 32 guest,it also failed with BSOD,see screenshot attached in comment 8.

Comment 10 zhoujunqin 2014-09-26 03:21:36 UTC
Created attachment 941371 [details]
the log file when converting xen-hvm-win7-x86_64 using -v -x

using -v -x to get detail log when conversion:
# virt-v2v -ic xen+ssh://10.66.106.64 -os default xen-hvm-win7-x86_64 -of qcow2 -v -x |& tee xen-hvm-win7-x86_64.log

but the original log file xen-hvm-win7-x86_64.log is too large, cut part of it called "win7_conversion_log", at last it hangs at here:
.....
hivex: hivex_open: used block id 118,107 (vk) at 0x1966f60 size 40
hivex: hivex_open: used block id 66,0 (B.) at 0x1966f88 size 16
hivex: hivex_open: used block id 248,94 (.^) at 0x1966f98 size 16
hivex: hivex_open: used block id 118,107 (vk) at 0x1966fa8 size 24
hivex: hivex_open: used block id 76,0 (L.) at 0x1966fc0 size 48
hivex: hivex_open: used block id 168,95 (._) at 0x1966ff0 size 16
hivex: hive

Comment 11 Richard W.M. Jones 2014-09-26 09:46:24 UTC
(In reply to zhoujunqin from comment #10)
> Created attachment 941371 [details]
> the log file when converting xen-hvm-win7-x86_64 using -v -x
> 
> using -v -x to get detail log when conversion:
> # virt-v2v -ic xen+ssh://10.66.106.64 -os default xen-hvm-win7-x86_64 -of
> qcow2 -v -x |& tee xen-hvm-win7-x86_64.log
> 
> but the original log file xen-hvm-win7-x86_64.log is too large, cut part of
> it called "win7_conversion_log", at last it hangs at here:
> .....
> hivex: hivex_open: used block id 118,107 (vk) at 0x1966f60 size 40
> hivex: hivex_open: used block id 66,0 (B.) at 0x1966f88 size 16
> hivex: hivex_open: used block id 248,94 (.^) at 0x1966f98 size 16
> hivex: hivex_open: used block id 118,107 (vk) at 0x1966fa8 size 24
> hivex: hivex_open: used block id 76,0 (L.) at 0x1966fc0 size 48
> hivex: hivex_open: used block id 168,95 (._) at 0x1966ff0 size 16
> hivex: hive

Hanging issue is a different bug.  This bug is about conversion
failures of Windows 7 guests.

Comment 12 Richard W.M. Jones 2014-09-26 14:56:46 UTC
I've done a huge amount of investigation and have come to some
conclusions:

It looks as if viostor.sys is being installed correctly by virt-v2v,
the registry changes being made are correct, fstrim is correct, and
there is no regression in ntfs-3g.

What stops it from booting appears to be a change or bug in qemu 2.1.0
which is fixed in qemu 2.1.1.  Just looking through the changelog, my
best bet is:

commit e43c0b2ea5574efb0bedebf6a7d05916eefeba52
Author: Michael S. Tsirkin <mst>
Date:   Thu Sep 11 18:45:33 2014 +0200

    virtio-pci: enable bus master for old guests

(Note: This is not in upstream qemu 2.1.1, but it is included in Fedora)

So I believe this is a qemu bug.

Comment 13 Richard W.M. Jones 2014-09-26 15:40:24 UTC
(In reply to Richard W.M. Jones from comment #12)
> commit e43c0b2ea5574efb0bedebf6a7d05916eefeba52
> Author: Michael S. Tsirkin <mst>
> Date:   Thu Sep 11 18:45:33 2014 +0200
> 
>     virtio-pci: enable bus master for old guests

It is NOT this patch.  However it's still something in qemu ...

Comment 14 Richard W.M. Jones 2014-09-26 15:52:48 UTC
OK, it's not actually qemu.  It's *seabios*.

1.7.4 => broken
1.7.5 => works

Tingting, what version of seabios are you testing against?

Comment 15 tingting zheng 2014-09-28 02:54:57 UTC
(In reply to Richard W.M. Jones from comment #14)
> OK, it's not actually qemu.  It's *seabios*.
> 
> 1.7.4 => broken
> 1.7.5 => works
> 
> Tingting, what version of seabios are you testing against?

I checked my machine,It's odd that the version of seabios is 1.7.5.
# rpm -qa |grep seabios
seabios-bin-1.7.5-5.el7.noarch

Comment 16 Richard W.M. Jones 2014-10-17 16:20:35 UTC
I believe the following two commits will fix this (and hopefully
won't break anything else).

https://github.com/libguestfs/libguestfs/commit/4f6033c3f4428f2c0033dfc256e71f05db17c3c2
https://github.com/libguestfs/libguestfs/commit/97c96ed6702cb7b4dfcc5acd08a29cb6f2b70b54

This will be added to >= 1.27.64.

Comment 18 tingting zheng 2014-10-20 10:10:37 UTC
Tested with:
libguestfs-1.28.1-1.1.el7.x86_64
libguestfs-winsupport-7.1-4.el7.x86_64
virt-v2v-1.28.1-1.1.el7.x86_64
virtio-win-1.7.2-1.el7.noarch

Use virt-v2v to convert win7 guests to rhev and kvm,guests can be booted successfully on both rhev and kvm,so move the bug to VERIFIED.

Comment 20 errata-xmlrpc 2015-03-05 13:45:33 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-0303.html


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