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 1138182 - xen guest will be kernel panic after converted by virt-v2v
Summary: xen guest will be kernel panic after converted by virt-v2v
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
high
high
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-04 08:24 UTC by tingting zheng
Modified: 2015-03-05 13:44 UTC (History)
7 users (show)

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


Attachments (Terms of Use)
screenshot of xen guest kernel panic after converted by virt-v2v (11.01 KB, image/png)
2014-09-04 08:24 UTC, tingting zheng
no flags Details
Log file of converting xen guest (86 bytes, text/plain)
2014-09-09 06:57 UTC, tingting zheng
no flags Details
Log file of converting xen guest -new (397.40 KB, text/plain)
2014-09-09 08:07 UTC, tingting zheng
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 tingting zheng 2014-09-04 08:24:26 UTC
Created attachment 934325 [details]
screenshot of xen guest kernel panic after converted by virt-v2v

Description
xen guest will be kernel panic after converted by virt-v2v

Version:
libguestfs-tools-c-1.27.32-1.1.el7.x86_64
libguestfs-1.27.32-1.1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Copy xen guest image and xml file from xen server to v2v server:

2.Run virt-v2v to connect a xen pv/hvm guest either by -i disk or -i libvirtxml.
# export LIBGUESTFS_BACKEND=direct
# virt-v2v -i disk -o local -os /var/tmp rhel6.6-pv-x64-test.img
[   0.0] Opening the source -i disk rhel6.6-pv-x64-test.img
[   0.0] Creating an overlay to protect the source from being modified
[   0.0] Opening the overlay
[   6.0] Initializing the target -o local -os /var/tmp
[   6.0] Inspecting the overlay
[  12.0] Converting Red Hat Enterprise Linux Server release 6.6 Beta (Santiago) to run on KVM
virt-v2v: warning: /files/boot/grub/device.map/hd0 references unknown
device "xvda".  You may have to fix this entry manually after
conversion.
[  35.0] Mapping filesystem data to avoid copying unused and blank areas
[  36.0] Closing the overlay
[  36.0] Copying disk 1/1 to /var/tmp/rhel6.6-pv-x64-test-sda (raw)
    (100.00/100%)
[ 170.0] Creating output metadata
[ 170.0] Finishing off

# virt-v2v -i libvirtxml  -os default xen-hvm-rhel6.4-x86_64.xml  -of qcow2
[   0.0] Opening the source -i libvirtxml xen-hvm-rhel6.4-x86_64.xml
[   0.0] Creating an overlay to protect the source from being modified
[   0.0] Opening the overlay
[   8.0] Initializing the target -o libvirt -os default
[   8.0] Inspecting the overlay
[  13.0] Converting Red Hat Enterprise Linux Server release 6.4 (Santiago) to run on KVM
virt-v2v: warning: /files/boot/grub/device.map/hd0 references unknown
device "xvda".  You may have to fix this entry manually after
conversion.
[  35.0] Mapping filesystem data to avoid copying unused and blank areas
[  35.0] Closing the overlay
[  36.0] Copying disk 1/1 to /var/lib/libvirt/images/xen-hvm-rhel6.4-x86_64-sda (qcow2)
    (100.00/100%)
[ 124.0] Creating output metadata
Pool default refreshed

Domain xen-hvm-rhel6.4-x86_64 defined from /tmp/v2vlibvirt7a7162.xml

[ 125.0] Finishing off

3.After conversion,try to boot the guest,it fails to boot with kernel panic:could not find /lib/modules/2.6.*/modules.dep:No such file or directory.

Actual results:
As description.

Expected results:
Guest can be booted successfully after converion by virt-v2v.

Comment 2 Richard W.M. Jones 2014-09-05 13:41:43 UTC
I'm not sure what the problem is here, but a couple of things
would help me to diagnose it further.

(0) Try virt-v2v 1.27.38 -- which hopefully I'll be uploading
later today.

(1) In virt-v2v 1.27.38 it should be possible to import directly
from the remote Xen hypervisor, ie:

  virt-v2v -ic xen+ssh://root@xen [...]

Read the section in the virt-v2v manual about "INPUT FROM RHEL 5 XEN"
first however.

(2) If it's still failing, can you add the -v -x options and
then give the complete output.  It will be very large, so
redirect it into a file like this:

  virt-v2v -v -x [.....] |& tee /tmp/log

Comment 3 tingting zheng 2014-09-09 06:55:48 UTC
(In reply to Richard W.M. Jones from comment #2)
> I'm not sure what the problem is here, but a couple of things
> would help me to diagnose it further.
> 
> (0) Try virt-v2v 1.27.38 -- which hopefully I'll be uploading
> later today.

I tried the below version,kernal panic again.
virt-v2v-1.27.39-1.1.el7.x86_64
libguestfs-1.27.39-1.1.el7.x86_64
libguestfs-tools-c-1.27.39-1.1.el7.x86_64

> (1) In virt-v2v 1.27.38 it should be possible to import directly
> from the remote Xen hypervisor, ie:
> 
>   virt-v2v -ic xen+ssh://root@xen [...]
> 
> Read the section in the virt-v2v manual about "INPUT FROM RHEL 5 XEN"
> first however.

Tried to use -ic xen+ssh://root@xen [...]
# sshkey-gen
# ssh-copy-id -i /root/.ssh/id_rsa.pub root@$xenserver
# eval `ssh-agent`
# ssh-add
# virt-v2v -v -x -ic xen+ssh://10.66.106.64 -os default --network default rhel6.6-pv-x64-test |& tee /tmp/v2v-xen.log

Conversion is successful,but guest still fails to boot,attach the log file for reference.

Comment 4 tingting zheng 2014-09-09 06:57:47 UTC
Created attachment 935557 [details]
Log file of converting xen guest

Comment 5 tingting zheng 2014-09-09 08:07:40 UTC
Created attachment 935572 [details]
Log file of converting xen guest -new

Pls ignore comment 4,I've uploaded the new log file.

Comment 6 Richard W.M. Jones 2014-09-09 14:25:26 UTC
The bug seems to be caused because we call dracut with the wrong
kernel version parameter.  Dracut itself prints an error:

/sbin/dracut --add-drivers "virtio virtio_ring virtio_blk virtio_net virtio_pci" \
  /boot/initramfs-2.6.32-496.el6.x86_64.img 2.6.32-496.el6
find: `/lib/modules/2.6.32-496.el6/': No such file or directory
find: `/lib/modules/2.6.32-496.el6/': No such file or directory
find: `/lib/modules/2.6.32-496.el6/': No such file or directory
find: `/lib/modules/2.6.32-496.el6/': No such file or directory
find: `/lib/modules/2.6.32-496.el6/': No such file or directory
find: `/lib/modules/2.6.32-496.el6/': No such file or directory

but doesn't actually exit with a detectable status code, and
therefore we continue, but the initramfs of the guest has been
destroyed, and hence the VM won't boot.

I was able to reproduce this problem easily simply by running virt-v2v
on a RHEL 6.5 guest image -- no Xen is needed.

The incorrect dracut parameter is fixed in this commit:

https://github.com/libguestfs/libguestfs/commit/59136518f13cb489cc17a411267d54444d7c8ac6

Unfortunately the second problem of dracut not exiting with
a useful status code is harder to fix.  What happens is that
it creates a corrupted initramfs (if it created nothing at
all, we could at least detect that).  Of course even fixing
dracut won't help since we cannot go back in time to fix
old guests with broken dracut/mkinitrd.

Comment 8 zhoujunqin 2014-09-10 11:08:19 UTC
I can reproduce this issue as bug description.

And try to verify it with new version:
virt-v2v-1.27.41-1.1.el7.x86_64
libguestfs-1.27.41-1.1.el7.x86_64

Tried to use -ic xen+ssh://root@xen [...]
# sshkey-gen
# ssh-copy-id -i /root/.ssh/id_rsa.pub root@$xenserver
# eval `ssh-agent`
# ssh-add
# virt-v2v -v -x -ic xen+ssh://10.66.106.64 -os default --network default rhel6.6-pv-x64-test 

Result: Conversion is successful, and guest successfully to boot up.
Move to VERIFIED.

Comment 10 errata-xmlrpc 2015-03-05 13:44:10 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.