Bug 471268

Summary: Unable to use the kernel as a DomU
Product: [Fedora] Fedora Reporter: Andreas Thienemann <andreas>
Component: kernelAssignee: Mark McLoughlin <markmc>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: berrange, kernel-maint, quintela, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-12 20:19:06 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:

Description Andreas Thienemann 2008-11-12 18:20:41 UTC
When trying to load a DomU with the current rawhide kernel 2.6.27.5-94.fc10.i686 the Xen hypervisor returns the following message:

Error: (2, 'Invalid kernel', 'elf_xen_note_check: ERROR: Will only load images built for the generic loader or Linux images')

The Dom0 is a rhel5.2 running kernel-xen-2.6.18-92.1.13.el5. kernel-xen-2.6.18-92.1.17.el5 does not boot but exhibit the behaviour described in <https://bugzilla.redhat.com/show_bug.cgi?id=468083>)

The xend is xen-3.0.3-64.el5_2.3 with the bzimage patch from <https://bugzilla.redhat.com/show_bug.cgi?id=457199> applied.

marcmc looked into the issue initially:

[query(markmc)] well, okay - looking at the code:
[query(markmc)] on the HV side:
[query(markmc)]     /* Check the contents of the Xen notes or guest string. */
[query(markmc)]     if ( ((strlen(parms->loader) == 0) ||
[query(markmc)]           strncmp(parms->loader, "generic", 7)) &&
[query(markmc)]          ((strlen(parms->guest_os) == 0) ||
[query(markmc)]           strncmp(parms->guest_os, "linux", 5)) )
[query(markmc)]     {
[query(markmc)]         elf_err(elf, "%s: ERROR: Will only load images built for the generic "
[query(markmc)]                 "loader or Linux images", __FUNCTION__);
[query(markmc)]         return -1;
[query(markmc)]     }
[query(markmc)] that's what you're hitting
[query(markmc)] and the guest kernel side seems to be adding the appropriate elf notes:
[query(markmc)]         ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS,       .asciz "linux")
[query(markmc)]         ELFNOTE(Xen, XEN_ELFNOTE_LOADER,         .asciz "generic")
[query(markmc)] but I tested on rhel5.3 too
[query(markmc)] not so long ago, so this is strange
[query(ixs)] did the HV change for 5.3?
[query(markmc)] no
[query(markmc)] you should file a bug against rawhide kernel
[query(markmc)] and cc xen-maint
[query(markmc)] ttyl

Comment 1 Daniel Berrangé 2008-11-12 19:44:48 UTC
FYI, I am able to successfully install today's rawhide x86_64 DOmU, on a RHEL-5.3 x86_64 host without any trouble.  I can also boot the i386 PAE DomU though it crashes & burns in a kernel panic shortly after (a separate bug I'll file)

Since the guest you are trying is i386 - can you double check you used the PAE i386 kernel image, and not the plain non-PAE i386 kernel which does *not* have Xen support in it.  eg from the install tree you want $TREE/mages/pxeboot/vmlinux-PAE.

Comment 2 Andreas Thienemann 2008-11-12 20:19:06 UTC
Good catch Daniel.

I didn't knew about only PAE kernels having pv_ops and installed the "generic" i686 kernel.

Using the PAE variant works fine:

Booting paravirtualized kernel on Xen
Xen version: 3.1.2-92.1.13.el5 (preserve-AD)

I'm closing this bug then, as it's a typical pebkac. :)

May I suggest putting something into the release notes to make sure other people do not suffer the same mistake?