Bug 517049

Summary: Implement support in xen domain builder for bzImage lzma and bzip2 compression
Product: Red Hat Enterprise Linux 5 Reporter: Mark McLoughlin <markmc>
Component: xenAssignee: Chris Lalancette <clalance>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4CC: ijc, jeremy, xen-maint, xinsun
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: xen-3.0.3-100.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 08:58:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 519122, 564321    
Bug Blocks:    
Attachments:
Description Flags
Implement bzip2 and LZMA loading of PV kernels
none
Implement bzip2 and LZMA loading of PV kernels (v2) none

Description Mark McLoughlin 2009-08-12 13:37:26 UTC
In RHEL5.3 we added support for bzImage format xen kernels (bug #457199). This was needed for booting Fedora 10 and later under Xen.

During Fedora 12 development, the bzImage compression format was switched to lzma which xen does not yet have support for. The change has been reverted until Fedora 13 (bug #457199)

In anticipation of this change in Fedora 13, we should implement lzma/bzip2 support for RHEL 5.5. Chris is looking into it.

Comment 1 Chris Lalancette 2009-08-13 07:11:56 UTC
Created attachment 357280 [details]
Implement bzip2 and LZMA loading of PV kernels

First cut of a patch to implement the ability to decompress bzip2 and LZMA compressed PV kernels.  It seems to work, although I haven't been able to verify 100% because the 2.6.30 kernel I'm using freezes immediately after boot (even with gzip compression, which leads me to suspect a bug in the kernel itself).  The patch itself is a little bit rough, but I'm going to post it upstream with the hopes that someone can point out where I can do things better.

Chris Lalancette

Comment 2 Chris Lalancette 2009-08-21 06:52:41 UTC
A variant of the above patch was checked into xen-unstable.hg as c/s 20103 and 20104.  So I just need to clean up the patch a bit for RHEL-5, and we should be set.

Chris Lalancette

Comment 3 Mark McLoughlin 2009-08-21 07:38:13 UTC
upstream patches:

  http://xenbits.xensource.com/xen-unstable.hg?rev/a687c4d35fdd
  http://xenbits.xensource.com/xen-unstable.hg?rev/7dad2e23bf89

also filed bug #518588 to have these added to Fedora 12

Comment 4 Chris Lalancette 2009-08-25 09:22:09 UTC
Created attachment 358543 [details]
Implement bzip2 and LZMA loading of PV kernels (v2)

New version of the patch, that more closely conforms to what upstream eventually committed as xen-unstable c/s 20103 and 20116.

Tested by me with gzip, lzma, and bzip2 compressed kernels.

Comment 10 XinSun 2010-01-07 07:56:03 UTC
Check this bug on xen-3.0.3-102.el5 with follow platform and F12 kernel:
x86_64 platform (server and client)
i386 platform (server and client)
no check on ia64 platform since it doesn't support fedora 12.

The checking steps are follows:
1. Download kernel-2.6.32.2-1.fc12.src.rpm (latest f12 kernel now)
2. Install this .src.rpm and run rpmbuild
3. Change the .config file to use:
  (1)for LZMA:
      CONFIG_HAVE_KERNEL_GZIP=y
      CONFIG_HAVE_KERNEL_BZIP2=y
      CONFIG_HAVE_KERNEL_LZMA=y
      CONFIG_KERNEL_LZMA=y
  (2)for bzip2:
     CONFIG_HAVE_KERNEL_GZIP=y
     CONFIG_HAVE_KERNEL_BZIP2=y
     CONFIG_HAVE_KERNEL_LZMA=y
     CONFIG_KERNEL_BZIP2=y
4. Run "make rpm" to compile my new kernel, choose LZMA  option or bzip2 option to compress/uncompress, then get the new kernel:
    kernel-2.6.32.2.lzma-1.x86_64.rpm
    kernel-2.6.32.2bzip2-2.x86_64.rpm
    kernel-2.6.32.2LZMA-1.i386.rpm
    kernel-2.6.32.2bzip2-1.i386.rpm
5. In f12 DomU guest, install this new kernel rpm and make the initrd.img file for it.
6. Modify the grub.conf file to use new kernel as default
7. Reboot this F12 guest and boot into new kernel
8  After login, run "uname -r"
   (1)for LZMA
      you will see 2.6.32.2-LZMA
   (2)for bzip2
      you will see 2.6.32.2-bzip2
9. Reboot this guest again, then you will also boot successfully from new kernel

So this bug is fixed on xen-3.0.3-102.el5, change this bug's status to verified.

Comment 12 errata-xmlrpc 2010-03-30 08:58:28 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0294.html

Comment 13 Paolo Bonzini 2010-04-08 15:42:27 UTC
This bug was closed during 5.5 development and it's being removed from the internal tracking bugs (which are now for 5.6).