Bug 816930 - After Using virt-p2v to convert rhel5 on MD device,it will kernel panic
After Using virt-p2v to convert rhel5 on MD device,it will kernel panic
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-p2v (Show other bugs)
6.3
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks: 840699 852633
  Show dependency treegraph
 
Reported: 2012-04-27 06:28 EDT by tingting zheng
Modified: 2015-03-12 13:43 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Converting a physical server running either Red Hat Enterprise Linux 4 or Red Hat Enterprise Linux 5 which has its file system root on an MD device is not supported. Converting such a guest results in a guest which fails to boot. Note that conversion of a Red Hat Enterprise Linux 6 server which has its root on an MD device is supported.
Story Points: ---
Clone Of:
: 852633 (view as bug list)
Environment:
Last Closed: 2015-03-12 13:43:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
log file of rhel5 kernel panic on md device (263.47 KB, text/plain)
2012-04-27 06:31 EDT, tingting zheng
no flags Details
screenshot of rhel5 kernel panic on md device (126.58 KB, image/png)
2012-04-27 06:32 EDT, tingting zheng
no flags Details
log file of rhel5 kernel panic on md device with LIBGUESTFS_DEBUG=1 (909.59 KB, text/plain)
2012-04-28 04:06 EDT, tingting zheng
no flags Details

  None (edit)
Description tingting zheng 2012-04-27 06:28:56 EDT
Description of Problem:
After Using virt-p2v to convert rhel5 on MD device,it will kernel panic

Version-Release number of selected component:
virt-v2v-0.8.7-5.el6.x86_64
rubygem-virt-p2v-0.8.6-3.el6

How reproducible:
Always

Step to Reproduce:
1.Download the virt-p2v iso from brewweb.

2.Create MD device /dev/md0 with sda1 and sdb1.

3.Install rhel5 on md0.

4.Use virt-p2v to convert the host on md0 to libvirt or RHEV.

5.After conversion,boot the guest,it will kernel panic.

Actual Results:
The guest will kernel panic,details see the screenshot.

Expected Results:
The guest can be boot successfully.

Additional info:
1.Tried the test with physical machine installed rhel5 on MD device:first with a single regular kernel,second with both regular kernel and xen-kernel.
2.If I convert rhel5 with both regular kernel and xen-kernel,there will be info showed in virt-p2v-server-*.log:
Checked the log file,there is messages showed:Couldn't guess kernel version number from path for kernel /boot/xen.gz-2.6.18-303.el5 at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Converter/RedHat.pm line 728, <> line 7.
Comment 1 tingting zheng 2012-04-27 06:31:22 EDT
Created attachment 580717 [details]
log file of rhel5 kernel panic on md device
Comment 3 tingting zheng 2012-04-27 06:32:43 EDT
Created attachment 580718 [details]
screenshot of rhel5 kernel panic on md device
Comment 4 Matthew Booth 2012-04-27 10:32:34 EDT
Please file a separate bug about the Xen kernel because we ought to handle that more gracefully. However, I don't think it's a high priority to fix it as presumably nobody will be actually doing P2V on a Xen server: it wouldn't work afterwards!
Comment 5 Matthew Booth 2012-04-27 10:41:09 EDT
Could you please capture trace output for the non-Xen kernel conversion:

Edit the virt-p2v-server executable.
Find the lines:
  #$ENV{'LIBGUESTFS_DEBUG'} = 1;
  #$ENV{'LIBGUESTFS_TRACE'} = 1;
Uncomment them both by removing the leading #.
Run the P2V conversion again.
Comment 6 tingting zheng 2012-04-27 22:41:09 EDT
(In reply to comment #4)
> Please file a separate bug about the Xen kernel because we ought to handle that
> more gracefully. However, I don't think it's a high priority to fix it as
> presumably nobody will be actually doing P2V on a Xen server: it wouldn't work
> afterwards!

I have filed another bug:Bug 817202 about using virt-p2v to convert physical machine installed xen.
Comment 7 tingting zheng 2012-04-28 04:06:56 EDT
Created attachment 580944 [details]
log file of rhel5 kernel panic on md device with LIBGUESTFS_DEBUG=1

As comment 5 says,enable LIBGUESTFS_TRACE and LIBGUESTFS_DEBUG,convert again,attached the log file.
Comment 8 RHEL Product and Program Management 2012-05-03 01:04:57 EDT
Since RHEL 6.3 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.
Comment 9 Matthew Booth 2012-05-03 11:38:21 EDT
I've managed to get to the bottom of this. The client doesn't boot because its initrd doesn't initialise md0. The reason for this is that mkinitrd doesn't detect it when it's run under libguestfs. Loosely, mkinitrd parses /etc/fstab and later expects device names to match the contents of /proc/mdstat. They don't because /proc/mdstat was created by the appliance, which didn't have access to the guest's mdadm.conf when it initialised md devices. mkinitrd also expects to be able to copy correctly named device entries from /dev, which also won't work because the devices aren't named as specific in the guest's mdadm.conf.

There's no simple solution to this problem, so I don't think we can get it into 6.3 at this late stage. I'll try to find a workaround, but workaround or not I think the best we can do for 6.3 is a tech note.
Comment 10 Matthew Booth 2012-05-04 12:00:59 EDT
I'd hoped that a workaround might be to replace a direct reference to the md device in fstab with a LABEL or UUID reference. Unfortunately this doesn't work, and I haven't been able to work out why. Specifically nash's nash-resolveDevice, used by mkinitrd, doesn't return a result for a LABEL or UUID on an md device.

For the moment, I think we can only document that this isn't supported.
Comment 11 Matthew Booth 2012-05-04 12:01:00 EDT
    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.
    
    New Contents:
Converting a physical server running either RHEL 4 or RHEL 5 which has its filesystem root on an MD device is not supported. Converting this guest will result in a guest which does not boot.

Note that conversion of a RHEL 6 server which has its root on an MD device is supported.
Comment 12 Martin Prpic 2012-05-07 05:01:48 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,3 +1 @@
-Converting a physical server running either RHEL 4 or RHEL 5 which has its filesystem root on an MD device is not supported. Converting this guest will result in a guest which does not boot.
+Converting a physical server running either Red Hat Enterprise Linux 4 or Red Hat Enterprise Linux 5 which has its file system root on an MD device is not supported. Converting such a guest results in a guest which fails to boot. Note that conversion of a Red Hat Enterprise Linux 6 server which has its root on an MD device is supported.-
-Note that conversion of a RHEL 6 server which has its root on an MD device is supported.
Comment 13 Laura Novich 2012-10-24 08:11:33 EDT
Added notes to the relevant chapter
As soon as it is built, will send to QA
Comment 14 RHEL Product and Program Management 2012-12-14 02:32:45 EST
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 16 Richard W.M. Jones 2015-03-12 13:43:43 EDT
I'm closing this bug:

 - virt-p2v has been rewritten for RHEL 7.2

 - Unofficial previews of the new version are available:
   http://oirase.annexia.org/virt-p2v/

 - If a similar bug occurs with the new version of virt-p2v,
   please open a new bug against Red Hat Enterprise Linux 7 / libguestfs

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