Running Non-default Kernels On SolusVM Templates

With the release of SolusVM 1.2.10 it is now possible to run non-default kernels in a vps in two ways. The first way was actually introduced in 1.2.08 and is described in the solus wiki. It involves setting per-template options in the advanced.conf on the master. The downside of this option is that each slave running a non-standard kernel needs to have a copy of the kernel, initrd and modules in the correct places. The second option, introduced in 1.2.10, is to instruct solusvm to use pygrub for a given template or specific installation of a template. With pygrub the kernel, initrd and modules are stored in the template and are used to boot the system. Hence there is no need to distribute the kernels to the slave. In fact this option is controlled mostly from within the control panel itself.

NOTE: To be clear, if you want to use the advanced options method you must be comfortable extracting kernels, initrds and modules from a template and distributing them to the slave(s). This is not automated for you!


The advantages of not using the default kernel are as follows:

  • Some templates will not work with the default kernel
  • Newer kernels may perform better and be better matched to a template even when the default works
  • Run 32-bit kernels on 64-bit slaves (particularly important for rpm-based distros)
  • Allow the kernel and modules to be managed from within a vps (pygrub only)

The purpose of this document is to discuss deployment options for Stacklet SolusVM templates using the new techniques. We will not be providing complete details of the techniques themselves -- see the Solus wiki for more details. The tables below summarize each of the three methods of specifying kernels for various popular templates. Note that the XENPVOS_* option needs to reference a specific template and is stored on the master in advanced.conf; note that the kernel, initrd and modules mentioned in XENPVOS_* are stored in the template but they must be extracted to the slave for this to work!


CentOS 5.5 based Templates

Method Details
Default Kernel Works; Note: Using the default 64-bit kernel to run 32-bit CentOS templates is not a good idea due to how yum determines the system architecture. In simpler terms, yum will be confused and refuse to install packages in this scenario.
XENPVOS Options "vmlinuz-2.6.18-194.3.1.el5xen|initrd-2.6.18-194.3.1.el5xen.img|2.6.18-194.3.1.el5xen|sda" or
"vmlinuz-2.6.18-194.11.1.el5xen|initrd-2.6.18-194.11.1.el5xen.img|2.6.18-194.11.1.el5xen|sda" or
"vmlinuz-2.6.18-194.11.4.el5xen|initrd-2.6.18-194.11.4.el5xen.img|2.6.18-194.11.4.el5xen|sda"

Pygrub Works


CentOS 6 Templates

Method Details
Default Kernel Will not boot
XENPVOS Options Use the latest CentOS kernel (vmlinuz-2.6.32-131.21.1.el6.i686 and vmlinuz-2.6.32-131.21.1.el6.x86_64 as of this writing) with xvda block devices. Always make sure to use the 32-bit kernel with 32-bit templates and the 64-bit kernel with 64-bit templates.
vmlinuz-2.6.32-131.21.1.el6.x86_64|initramfs-2.6.32-131.21.1.el6.x86_64.img|2.6.32-131.21.1.el6.x86_64|xvda
vmlinuz-2.6.32-131.21.1.el6.i686|initramfs-2.6.32-131.21.1.el6.i686.img|2.6.32-131.21.1.el6.i686|xvda

Pygrub Works. IMPORTANT: xvda* device names are mandatory in the vmXXX.cfg for CentOS 6 deployments. If you normally use sda* then you must override the default by defining the XENPVOS options as described immediately above.


Debian 5 (Lenny) Templates

Method Details
Default Kernel Not recommended
XENPVOS Options
32 and 64-bit
"vmlinuz-2.6.26-2-xen-686|initrd.img-2.6.26-2-xen-686|2.6.26-2-xen-686|sda"
"vmlinuz-2.6.26-2-xen-amd64|initrd.img-2.6.26-2-xen-amd64|2.6.26-2-xen-amd64|sda"
Pygrub Works


Debian 6 (Squeeze) Templates

Method Details
Default Kernel Not recommended
XENPVOS Options Works: extract the debian kernel/initrd/modules from the template itself. These kernels use xvda* device nodes. Make sure to use the amd64 kernel with 64-bit domUs and the 686-bigmem kernel for 32-bit domUs
Pygrub Works


Fedora 14 Templates

Method Details
Default Kernel Will not boot
Advanced Options vmlinuz-2.6.35.6-48.fc14.i686.PAE|initramfs-2.6.35.6-48.fc14.i686.PAE.img|2.6.35.6-48.fc14.i686.PAE|xvda
or
vmlinuz-2.6.35.6-48.fc14.x86_64|initramfs-2.6.35.6-48.fc14.x86_64.img|2.6.35.6-48.fc14.x86_64|xvda

Pygrub Works, but you should still define the advanced options in the previous line


Fedora 16 Templates

Method Details
Default Kernel Will not boot
Advanced Options vmlinuz-3.1.0-7.fc16.x86_64|initramfs-3.1.0-7.fc16.x86_64.img|3.1.0-7.fc16.x86_64|xvda
Pygrub Works


Gentoo 2010 Templates

Method Details
Default Kernel Will not boot
XENPVOS Options "vmlinuz-2.6.31.6|-|2.6.31.6|xvda"
Pygrub Works, but you still need to define the advanced options in the previous line


Gentoo 2011 Templates

Method Details
Default Kernel Will not boot
XENPVOS Options "vmlinuz-2.6.35.8.stk.x86|-|2.6.35.8.stk.x86|xvda" or
"vmlinuz-2.6.35.8.stk.x86_64|-|2.6.35.8.stk.x86_64|xvda"

The 2.6.35.8 kernel and modules can be extracted from the template itself or downloaded as a separate tarball: 32-bit kernel 64-bit kernel
Pygrub Works


Scientific 6 Templates

Method Details
Default Kernel Will not boot
XENPVOS Options Use the latest kernel (vmlinuz-2.6.32-131.12.1.el6.x86_64 as of this writing) with xvda block devices.
vmlinuz-2.6.32-131.12.1.el6.x86_64|initramfs-2.6.32-131.12.1.el6.x86_64.img|2.6.32-131.12.1.el6.x86_64|xvda
Pygrub Works. IMPORTANT: xvda* device names are mandatory in the vmXXX.cfg for Scientific 6 deployments. If you normally use sda* then you must override the default by defining the XENPVOS as described immediately above.


Slackware 13.1 Templates

Method Details
Default Kernel Will not work
XENPVOS Options "vmlinuz-2.6.31.6|-|2.6.31.6|xvda"
Pygrub Works, but you still need to define the advanced options in the previous line


Slackware 13.37 Templates

Method Details
Default Kernel Not recommended
XENPVOS Options 32-bit: "vmlinuz-2.6.37.6.stk.x86|-|2.6.37.6.stk.x86|xvda"
64-bit: "vmlinuz-2.6.37.6.stk.x86_64|-|2.6.37.6.stk.x86_64|xvda"
Pygrub Works


Ubuntu 9.10 Templates

Method Details
Default Kernel Will not boot
XENPVOS Options
32 and 64-bit
"vmlinuz-2.6.31-304-ec2|initrd.img-2.6.31-304-ec2|2.6.31-304-ec2|sda"
"vmlinuz-2.6.31-20-server|initrd.img-2.6.31-20-server|2.6.31-20-server|xvda"
Pygrub Works


Ubuntu 10.04 Templates

Method Details
Default Kernel Will not boot
XENPVOS Options It is possible to use linux-image-ec2 or linux-image-virtual. The current Ubuntu Lucid templates have linux-image-virtual installed and use xvda* device nodes.
Pygrub Works


Ubuntu 10.10 Maverick Templates

Method Details
Default Kernel Will not boot
XENPVOS Options "vmlinuz-2.6.32-305-ec2|initrd.img-2.6.32-305-ec2|2.6.32-305-ec2|sda"
Pygrub Works


Ubuntu 11.04 Maverick Templates

Method Details
Default Kernel Will not boot
XENPVOS Options 64:bit "vmlinuz-2.6.38-8-generic|initrd.img-2.6.38-8-generic|2.6.38-8-generic|xvda"
32-bit: "vmlinuz-2.6.38-8-generic-pae|initrd.img-2.6.38-8-generic-pae|2.6.38-8-generic-pae|xvda"
Pygrub Works


Ubuntu 12.04 LTS Precise Templates

Method Details
Default Kernel Will not boot. We highly recommend using an Ubuntu kernel using one of the options below.
XENPVOS Options "vmlinuz-3.2.0-24-virtual|initrd.img-3.2.0-24-virtual|3.2.0-24-virtual|xvda"
Pygrub Works. As always with pygrub the kernel inside the template is used, in this case Ubuntu's linux-image-virtual 3.2


© 2010 Stacklet LLC - Privacy