Bug 1414505 - virt-p2v needs RHEL 5 build to support LSI Logic / Symbios Logic MegaRAID SAS 8208ELP/8208ELP
Summary: virt-p2v needs RHEL 5 build to support LSI Logic / Symbios Logic MegaRAID SAS...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.3
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: P2V V2V
Depends On: 1414510 1414682
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-18 16:56 UTC by Gajanan
Modified: 2020-03-11 15:37 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-16 14:19:24 UTC
Target Upstream Version:


Attachments (Terms of Use)
reproducer.xml (702 bytes, text/plain)
2017-01-19 10:22 UTC, Richard W.M. Jones
no flags Details
v2v.log (85.06 KB, text/plain)
2017-01-20 11:43 UTC, kuwei@redhat.com
no flags Details
virt-v2v-auto-running.log (1.24 MB, text/plain)
2017-01-22 09:17 UTC, mxie@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2877281 0 None None None 2017-01-18 17:01:59 UTC

Description Gajanan 2017-01-18 16:56:25 UTC
Description of problem:

Issue description by customer is as below: 

We installed and Configured Conversion server for P2V with the latest set of software bits. 

And using the latest version of p2v iso we booted our physical server and when we try to convert the physical server to virtual machine, conversion getting failed with the following error.

ESC[1;31m   virt-v2v: error: inspection could not detect the source guest (or physical machine).

Assuming that you are running virt-v2v/virt-p2v on a source which is
supported (and not, for example, a blank disk), then this should not
happen.  You should run 'virt-v2v -v -x ... >& log' and attach the complete
log to a new bug report (see http://libguestfs.org).

No root device found in this operating system image.ESC[0m
rm -rf '/var/tmp/null.qYJv5o'
libguestfs: trace: v2v: close
libguestfs: closing guestfs handle 0xe55630 (state 2)
libguestfs: trace: v2v: internal_autosync

Please p2v system is running RHEL 5.4 on a Super Micro hardware.

Attached the sosreport of both the conversion server and v2v logs  as well as the sosreport of  p2v system for your reference.

Please check and let us know how we can fix this.

Comment 4 Richard W.M. Jones 2017-01-19 10:22:54 UTC
Created attachment 1242426 [details]
reproducer.xml

Reproducer:

(1) Create a RHEL 5 VM using virt-builder (exact version doesn't matter):

$ virt-builder rhel-5.10

(2) I manually convert this into a mirrored DDF software RAID guest.

This guest probably won't be bootable, but it's sufficient for testing
virt-v2v, reproducing the bug and seeing if it is fixed.

$ truncate -s 10G disk1 disk2
$ virt-rescue -a disk1 -a disk2 -a rhel-5.10.img
><rescue> mdadm -C /dev/md/ddf --raid-devices=2 /dev/sda /dev/sdb -e ddf
mdadm: container /dev/md/ddf prepared.
><rescue> mdadm -C /dev/md0 /dev/md/ddf --level=mirror --raid-devices=2
mdadm: array /dev/md0 started.

Use the fdisk command to create partitions on the /dev/md0
device.  The final configuration should look like this:

><rescue> fdisk -l /dev/md0
Device     Boot    Start      End  Sectors Size Id Type
/dev/md0p1          2048  2099199  2097152   1G 83 Linux
/dev/md0p2       2099200 14682111 12582912   6G 83 Linux
/dev/md0p3      14682112 20905983  6223872   3G 82 Linux swap / Solaris

Use the dd command to copy the RHEL 5 data to the /dev/md0pN
partitions:

><rescue> dd if=/dev/sdc1 of=/dev/md0p1 bs=1M
><rescue> dd if=/dev/sdc2 of=/dev/md0p2 bs=1M
><rescue> dd if=/dev/sdc3 of=/dev/md0p3 bs=1M

Exit from virt-rescue.  Note that it may take several minutes for
virt-rescue to exit because a very large amount of data will be cached.
Do not interrupt this or else you will end up with a corrupt disk image.

(3) Remove the RHEL 5 image which is no longer needed:

rm rhel-5.10.img

(4) You can now run virt-v2v on the mirrored disks to either reproduce
the bug or verify that it is fixed:

(4a) Download the attached 'reproducer.xml'

(4b) Run:

virt-v2v -i libvirtxml reproducer.xml -o null
(add -v -x flags to see the full errors)

Comment 5 Richard W.M. Jones 2017-01-19 13:19:23 UTC
I have placed updated packages which should fix this bug here:

  http://oirase.annexia.org/tmp/bz1414505/

Only virt-v2v on the conversion server needs to be updated.  The
same virt-p2v ISO can still be used.

It may be that fixing this bug simply causes another bug to appear.
If that happens *please open a second bug about it*, and in that
second bug include the new virt-p2v log files.

Comment 6 tingting zheng 2017-01-20 03:22:49 UTC
(In reply to Richard W.M. Jones from comment #5)
> I have placed updated packages which should fix this bug here:
> 
>   http://oirase.annexia.org/tmp/bz1414505/
> 
> Only virt-v2v on the conversion server needs to be updated.  The
> same virt-p2v ISO can still be used.
> 
> It may be that fixing this bug simply causes another bug to appear.
> If that happens *please open a second bug about it*, and in that
> second bug include the new virt-p2v log files.

Hi,QE are trying to test this bug and running some testing for the new build,but we are approaching the Chinese new year and most of us will take PTO from next Tue(Jan 24th),so I would just say we will try to test this bug as much as possible.

Comment 8 kuwei@redhat.com 2017-01-20 11:43:04 UTC
Created attachment 1242723 [details]
v2v.log

Comment 11 Richard W.M. Jones 2017-01-20 12:41:17 UTC
(In reply to kuwei@redhat.com from comment #7)
> Hi,rjones
> 
> I can reproduce it  with your steps  (comment4), but conversion still failed
> on new packages.
> 
> Package version:
> libguestfs-1.32.7-3.el7_3.2.x86_64
> virt-v2v-1.32.7-3.el7_3.2.x86_64
> 
> Steps:
> 
> 1. Create a centos 7 VM using virt-builder:
> 
> # virt-builder centos-7.0

I said "exact version doesn't matter", but I still meant RHEL 5.x.
We have RHEL 5 virt-builder guests, ask me by email if you don't
have access to these.

Comment 12 kuwei@redhat.com 2017-01-22 03:38:28 UTC
Hi,rjones

Thanks for your help,now I can build rhel 5 by virt-builder, and through your steps(comment 4) conversion is successful .

Package version:
libguestfs-1.32.7-3.el7.3.x86_64
virt-v2v-1.32.7-3.el7.3.x86_64
libvirt-2.5.0-1.el7.x86_64

Steps:

1. Create a rhel5 VM using virt-builder:

#virt-builder rhel-5.10
[   4.9] Downloading: http://file.rdu.redhat.com/~rjones/builder/rhel-5.10.xz
[   5.6] Planning how to build this image
[   5.6] Uncompressing
[  16.3] Opening the new disk
[  23.6] Setting a random seed
[  23.6] Setting passwords
virt-builder: Setting random password of root to J1dkELJLxk39THxD
[  25.1] Finishing off
                   Output file: rhel-5.10.img
                   Output size: 6.0G
                 Output format: raw
            Total usable space: 4.6G
                    Free space: 3.7G (80%)
# truncate -s 10G disk1 disk2
# virt-rescue -a disk1 -a disk2 -a rhel-5.10.img

><rescue> mdadm -C /dev/md/ddf --raid-devices=2 /dev/sda /dev/sdb -e ddf
mdadm: container /dev/md/ddf prepared.
><rescue> mdadm -C /dev/md0 /dev/md/ddf --level=mirror --raid-devices=2
mdadm: array /dev/md0 started.

2. Use the fdisk command to create partitions on the /dev/md0 device

><rescue> fdisk -l /dev/md0
Device     Boot    Start      End  Sectors Size Id Type
/dev/md0p1          2048  2099199  2097152   1G 83 Linux
/dev/md0p2       2099200 14682111 12582912   6G 83 Linux
/dev/md0p3      14682112 20905983  6223872   3G 82 Linux swap / Solaris

3. Use the dd command to copy the rhel 5 data to the /dev/md0pN
partitions:

><rescue> dd if=/dev/sdc1 of=/dev/md0p1 bs=1M
><rescue> dd if=/dev/sdc2 of=/dev/md0p2 bs=1M
><rescue> dd if=/dev/sdc3 of=/dev/md0p3 bs=1M

4.Remove  rhel 5, download the attached'reproduce.xml'. Run:
# virt-v2v -i libvirtxml reproducer.xml -o null
[   0.0] Opening the source -i libvirtxml reproducer.xml
[   0.0] Creating an overlay to protect the source from being modified
[   1.1] Initializing the target -o null
[   1.1] Opening the overlay
[   6.7] Inspecting the overlay
[  34.1] Checking for sufficient free disk space in the guest
[  34.1] Estimating space required on target for each disk
[  34.1] Converting Red Hat Enterprise Linux Server release 5.10 (Tikanga) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 117.7] Mapping filesystem data to avoid copying unused and blank areas
[ 127.1] Closing the overlay
[ 127.3] Checking if the guest needs BIOS or UEFI to boot
[ 127.3] Assigning disks to buses
[ 127.3] Copying disk 1/2 to /var/tmp/null.ycmQeg/sda (raw)
    (100.00/100%)
[ 206.1] Copying disk 2/2 to /var/tmp/null.ycmQeg/sdb (raw)
    (100.00/100%)
[ 249.1] Creating output metadata
[ 249.1] Finishing off



Hi,rjones

Conversion without error  when convert a rhel5 guest  by virt-v2v through your steps ,but i want to know what can i do  when convert others version guest(for example :centos 7 )is failed with the same error (comment 7).

Comment 14 mxie@redhat.com 2017-01-22 09:17:04 UTC
Created attachment 1243298 [details]
virt-v2v-auto-running.log

Comment 15 Richard W.M. Jones 2017-01-23 08:49:45 UTC
(In reply to kuwei@redhat.com from comment #12)
> Conversion without error  when convert a rhel5 guest  by virt-v2v through
> your steps ,but i want to know what can i do  when convert others version
> guest(for example :centos 7 )is failed with the same error (comment 7).

The issues in bug 1414510 and bug 1414682 were a red herring.  The
underlying problem here was the lack of RAID driver for the customer's
fakeraid card in RHEL 7.

To fix this properly I supplied a version of virt-p2v built on top
of RHEL 5 to Pradeep, and he's going to test that today with the RHEL 5
proprietary driver that is required.

So at the moment, consider the reproducer in comment 4 to be wrong,
and ther's nothing you can do to test this.

Comment 19 Richard W.M. Jones 2017-02-09 18:54:32 UTC
There are now RHEL 5 and RHEL 6-based virt-p2v ISOs, both 32- and 64-bit
available here:

http://oirase.annexia.org/virt-p2v/
http://oirase.annexia.org/virt-p2v/RHEL-7.3

I'll try to keep these up to date as we upgrade RHEL and help customers
with them.

However they are essentially unsupportable through regular support channels,
and cannot easily be built in brew (and therefore cannot be distributed
through ordinary channels like RHN either).

Comment 20 Richard W.M. Jones 2017-02-09 18:55:24 UTC
Should also mention that the upstream scripts used to build
the ISOs in the previous comment are:

https://github.com/libguestfs/libguestfs/commit/b702ec19e859f6f3333b129a8b0a7fc278ed400f

Comment 21 Richard W.M. Jones 2017-02-16 14:19:24 UTC
I don't think we need to do anything further on this bug, as
RHEL 5 & 6-based ISOs are already available (see comment 19).


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