How to compile and install Xen kernel modules.
Contents
Introduction
Setting up to compile
Download Kernel
Configure kernel and compile
Compiling for legacy Xen plans (Q96-Q288)
Introduction
This document describes the process of compiling a customer kernel and modules for your XS series of Xen virtual private server.
Setting up to compile
Several packages are necessary in order to compile your kernel and modules.
They are readily available under any distributions package manager.
(You may already have some of these installed.)
yum install gcc gcc-devel ncurses-devel make wget -y
Download Kernel
Any kernel from 2.6.23 on has the necessary Xen PV-OPS support in order to boot and run
on our XS virtual private servers. You may obtain a kernel from http://kernel.org
cd /usr/src wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.34.tar.gz tar -xzf linux-2.6.34.tar.gz
Configure Kernel and compile
make menuconfig
Ensure that the following features are turned on in your .config:
CONFIG_PARAVIRT_GUEST=y CONFIG_XEN=y CONFIG_XEN_BLKDEV_FRONTEND=y CONFIG_XEN_NETDEV_FRONTEND=y CONFIG_HVC_XEN=y
Check the Xen wiki for information on where these are under menuconfig:
http://wiki.xensource.com/xenwiki/Kernel.org_Linux_on_Xen
Compile your kernel, its modules, and install them. (-j4 uses 4 processors to speed things up)
make clean; make -j4; make modules -j4; make modules_install; make install
You should now see your kernel under /boot, and your modules under /lib/modules.
Now you must setup Grub if you would like to boot this kernel, using PV-Grub.
Depreciated for older Xen kernels
The Xen kernels we provide include some of the more commonly asked for code already in place.
In addition, we have compiled many modules already, and have made them available for download.
To obtain the already built modules:
wget http://www.quantact.com/dl/2.6.16-xen.tgz
To compile your own modules:
wget http://www.quantact.com/dl/xen-source.tbz2 tar -xjf xen-source.tbz2 cd linux-2.6.16-xen gzip -dc /proc/config.gz > .config make make menuconfig make modules make modules_install
If you get errors on the make menuconfig stage, be sure to install ncurses-devel.
When selecting modules to compile under make menuconfig, toggle the "M", not the "Y".
Inserting modules is accomplished via the command "modprobe module_name",
where module_name is the module you wish to install, such as "modprobe tuntap", etc.
If you receive an error stating:
modprobe: QM_MODULES: Function not implemented
You will need to download a more recent module init scripts package:
http://kerneltrap.org/node/3891
- Login to post comments
