Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
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 1157691 - virt-p2v-make-disk should add firmwares
Summary: virt-p2v-make-disk should add firmwares
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: 1157679
Blocks: TRACKER-virt-p2v
TreeView+ depends on / blocked
 
Reported: 2014-10-27 13:56 UTC by Richard W.M. Jones
Modified: 2015-03-05 13:46 UTC (History)
10 users (show)

Fixed In Version: libguestfs-1.28.1-1.6.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1157679
Environment:
Last Closed: 2015-03-05 13:46:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


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 Richard W.M. Jones 2014-10-27 13:56:52 UTC
Guess we're gonna need this for RHEL 7.1 too ...

+++ This bug was initially created as a clone of Bug #1157679 +++

virt-p2v-make-disk and -make-kickstart should add firmware files to the virt-builder image.  I'm trying to build a USB key to migrate a physical machine with an Adaptec SAS controller that needs aic94xx firmware.  I added "--run-command "yum -y groupinstall 'Hardware Support'" to the -make-disk script (which of course is Fedora specific).

--- Additional comment from Richard W.M. Jones on 2014-10-27 09:53:11 EDT ---

This patch (only lightly tested) should fix it:

https://github.com/libguestfs/libguestfs/commit/91788cd76f23227c102293a5dc5eef1c30cf7858

Comment 4 Richard W.M. Jones 2014-10-28 11:30:11 UTC
Suggested method to QA this:

(1) Build the image by doing:

$ virt-p2v-make-disk -o /tmp/p2v.img fedora-20

(2) Open the disk image in virt-rescue:

$ virt-rescue --ro -a /tmp/p2v.img

(3) In the virt-rescue shell, mount up the partitions:

><rescue> mount /dev/sda3 /sysroot
><rescue> mount /dev/sda1 /sysroot/boot

(4) Look for the initramfs file in /sysroot/boot/ and run
lsinitrd on it:

><rescue> cd /sysroot/boot/
><rescue> ls -l
><rescue> lsinitrd NAME-OF-INITRD |& grep usb.storage

You should see at least 1 line referring to the usb-storage.ko
kernel module, which indicates that it has been included in the
initramfs.

Comment 5 Richard W.M. Jones 2014-10-28 11:32:08 UTC
(In reply to Richard W.M. Jones from comment #4)
> Suggested method to QA this:
> 
> (1) Build the image by doing:
> 
> $ virt-p2v-make-disk -o /tmp/p2v.img fedora-20
> 
> (2) Open the disk image in virt-rescue:
> 
> $ virt-rescue --ro -a /tmp/p2v.img
> 
> (3) In the virt-rescue shell, mount up the partitions:
> 
> ><rescue> mount /dev/sda3 /sysroot
> ><rescue> mount /dev/sda1 /sysroot/boot
> 
> (4) Look for the initramfs file in /sysroot/boot/ and run
> lsinitrd on it:
> 
> ><rescue> cd /sysroot/boot/
> ><rescue> ls -l
> ><rescue> lsinitrd NAME-OF-INITRD |& grep usb.storage
> 
> You should see at least 1 line referring to the usb-storage.ko
> kernel module, which indicates that it has been included in the
> initramfs.

Sorry, also ...

(5) Check that /sysroot/lib/firmware exists and contains
/sysroot/lib/firmware/aic94xx-seq.fw

Comment 6 Richard W.M. Jones 2014-10-28 11:33:04 UTC
Tingting, can you QA ack this please.  See comments 4 & 5
for how to QA this.

Comment 8 tingting zheng 2014-10-30 03:41:06 UTC
I tested with:
virt-v2v-1.28.1-1.6.el7.x86_64
libguestfs-1.28.1-1.6.el7.x86_64

# virt-p2v-make-disk -o /tmp/p2v.img fedora-20

gpg: Signature made Tue 08 Jul 2014 05:11:00 AM EDT using RSA key ID E1B768A0
gpg: Good signature from "Richard W.M. Jones <rjones>"
gpg:                 aka "Richard W.M. Jones <rich>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: F777 4FB1 AD07 4A7E 8C87  67EA 9173 8F73 E1B7 68A0
[   2.0] Downloading: http://libguestfs.org/download/builder/fedora-20.xz
######################################################################## 100.0%
[1622.0] Planning how to build this image
[1622.0] Uncompressing
[1635.0] Opening the new disk
[1835.0] Setting a random seed
[1836.0] Updating core packages
[3062.0] Installing packages: pcre libxml2 gtk2 /usr/bin/xinit /usr/bin/ssh /usr/bin/qemu-nbd /usr/bin/Xorg xorg-x11-drivers xorg-x11-fonts-Type1 matchbox-window-manager @hardware-support
[3165.0] Uploading: /usr/share/virt-p2v/issue to /etc/issue
[3165.0] Uploading: /usr/share/virt-p2v/issue to /etc/issue.net
[3165.0] Making directory: /usr/libexec
[3165.0] Uploading: /usr/libexec/virt-p2v to /usr/libexec
[3165.0] Changing permissions of /usr/libexec/virt-p2v to 0755
[3166.0] Uploading: /usr/share/virt-p2v/launch-virt-p2v to /usr/bin/
[3166.0] Changing permissions of /usr/bin/launch-virt-p2v to 0755
[3166.0] Uploading: /usr/share/virt-p2v/p2v.service to /etc/systemd/system/
[3166.0] Making directory: /etc/systemd/system/default.target.wants
[3166.0] Linking: /etc/systemd/system/default.target.wants/p2v.service -> /etc/systemd/system/p2v.service
[3166.0] Editing: /usr/lib/systemd/system/getty@.service
[3166.0] Editing: /etc/systemd/logind.conf
[3166.0] Uploading: /tmp/tmp.Rx1vVd9LVg/p2v.conf to /etc/dracut.conf.d/
virt-builder: error: libguestfs error: open: /tmp/tmp.Rx1vVd9LVg/p2v.conf: 
No such file or directory

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

  virt-builder -v -x [...]

I've meet the above error,would you pls help me to check it,thanks.

Comment 9 Richard W.M. Jones 2014-10-30 10:53:42 UTC
I have no idea why that failed.  It works fine for me.

Could files in /tmp have got deleted somehow while the program
was running?

Can you try outputting to -o /var/tmp/p2v.img instead, just in
case it's running out of space on /tmp.

Comment 10 tingting zheng 2014-10-30 11:26:54 UTC
(In reply to Richard W.M. Jones from comment #9)
> I have no idea why that failed.  It works fine for me.
> 
> Could files in /tmp have got deleted somehow while the program
> was running?
> 
> Can you try outputting to -o /var/tmp/p2v.img instead, just in
> case it's running out of space on /tmp.

I tired to output -o /var/tmp/p2v.img,and followed the steps in comment 4 and comment 5,it worked,results listed as below:

><rescue> lsinitrd initramfs-3.16.6-203.fc20.x86_64.img |& grep usb.storage
drwxr-xr-x   2 root     root            0 Oct 30 11:06 usr/lib/modules/3.16.6-203.fc20.x86_64/kernel/drivers/usb/storage
-rw-r--r--   1 root     root       133383 Oct 25 13:11 usr/lib/modules/3.16.6-203.fc20.x86_64/kernel/drivers/usb/storage/usb-storage.ko

><rescue> ls /sysroot/lib/firmware/aic94xx-seq.fw
/sysroot/lib/firmware/aic94xx-seq.fw

Refer to the above comments,moved the bug to VERIFIED.

Comment 12 errata-xmlrpc 2015-03-05 13:46:56 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.