0

We are able to successfully install and boot to a XEN kernel on 5 of our 7 eucalyptus node controllers. The last two are having the same problems despite running an identical installation process.

I've installed eucalyptus-nc and am able to start the service using the kvm hypervisor. I then configure eucalyptus to use xen as the hypervisor and install xen with the following packages:

yum install -y centos-release-xen xen libvirt python-virtinst libvirt-daemon-xen

I run this command twice, since it doesn't pull the xen package through the first time. The packages install successfully.

I've also updated /boot/grub/grub.conf to include a new entry for our xen kernel:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_erams7-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz

title CentOS-XEN (XEN-4.2.4-33.el6.centos.alt.x86_64)
    root (hd0,0)
    kernel /xen.gz dom0_mem=1024M,max:1024M loglvl=all guest_loglvl=all
    module /vmlinuz-3.10.43-11.el6.centos.alt.x86_64 ro root=/dev/mapper/vg_erams7-lv_root rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=vg_erams7/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg_erams7/lv_root rd_NO_DM rhgb quiet
    module /initramfs-3.10.43-11.el6.centos.alt.x86_64.img
title CentOS (3.10.43-11.el6.centos.alt.x86_64)
    root (hd0,0)
    kernel /vmlinuz-3.10.43-11.el6.centos.alt.x86_64 ro root=/dev/mapper/vg_erams7-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_erams7/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg_erams7/lv_root rd_NO_DM rhgb quiet
    initrd /initramfs-3.10.43-11.el6.centos.alt.x86_64.img
title CentOS (2.6.32-431.20.5.el6.x86_64)
    root (hd0,0)
    kernel /vmlinuz-2.6.32-431.20.5.el6.x86_64 ro root=/dev/mapper/vg_erams7-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_erams7/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg_erams7/lv_root rd_NO_DM rhgb quiet
    initrd /initramfs-2.6.32-431.20.5.el6.x86_64.img
title CentOS (2.6.32-431.el6.x86_64)
    root (hd0,0)
    kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/vg_erams7-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_erams7/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg_erams7/lv_root rd_NO_DM rhgb quiet
    initrd /initramfs-2.6.32-431.el6.x86_64.img

I then flash the MBR using the grub shell:

$ grub
Probing devices to guess BIOS drives. This may take a long time.


 GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> find /grub/grub.conf
find /grub/grub.conf
 (hd0,0)
grub> root (hd0,0)
root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
setup (hd0)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd0)"...  27 sectors are embedded.
succeeded
 Running "install /grub/stage1 (hd0) (hd0)1+27 p (hd0,0)/grub/stage2 /grub/grub.conf"... succeeded
Done.

I am able to reboot but the grub menu only displays the three existing kernels, not the newly-added XEN kernel above:

enter image description here

Once I login, running virsh list displays nothing, when it should display something like this:

Id    Name                           State
----------------------------------------------------
 0     Domain-0                       running

The eucalyptus-nc service also fails to start, since the XEN kernel is not booting.

My question - what could be causing the grub entry above from being recognized on boot?

1

This was fixed by editing the grub file so that GRUB could recognize the XEN kernel, namely spacing and editing the title of the logical volume to match the version of XEN installed on the server:

# grub.conf generated by anaconda
... lines inserted below ...


title CentOS-XEN (**XEN-3.10.43-11.el6.centos.alt.x86_64**)
        root (hd0,0)
        kernel /xen.gz dom0_mem=1024M,max:1024M loglvl=all guest_loglvl=all
        module /vmlinuz-3.10.43-11.el6.centos.alt.x86_64 ro root=/dev/mapper/vg_erams7-lv_root rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=vg_erams7/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg_erams7/lv_root rd_NO_DM rhgb quiet
        module /initramfs-3.10.43-11.el6.centos.alt.x86_64.img
        ... lines inserted below ...

title CentOS (3.10.43-11.el6.centos.alt.x86_64)
...

I always thought the title line was simply a label and that spacing within the grub file didn't matter, but I was proven wrong :-/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.