Changes

Jump to: navigation, search
no edit summary
A common In order to boot and run a Xen configuration involves mounting the root filesystems for domainU guests from guest domain a remote server using NFS key requirement (for details on setting up such amongst other items) is a configuration read [[Creating root filesystem populated with the files and Booting a directories necessary for the guest operating system to function. One of the most flexible Xen Guest domainU using configurations involves the installation of the root filesystem on an NFS Mounted Root Filesystem]]server such that it can be accessed and booted on a client system. This approach is of particular value use when it is necessary the need to migrate a Xen guest domain domainU guests from one system host to anotherarises. Since both the original host and the target host to which the guest is migrating need access to the domainU's root filesystem, NFS provides an ideal mechanism for achieving this by allowing the root filesystem located on the NFS server to be mounted on both client hosts.
Unfortunately, support for In order to boot a Xen guest domain with an NFS mounted root filesystems filesystem a version of the Linux kernel with root NFS support is disabled required. Unfortunately this functionality is not enabled by default in most Linux standard kernels for security reasons. Before embarking on such a Xen configuration it It is necessary, therefore, to build a custom Xen kernel with NFS root filesystem support build-inthis capability enabled. The purpose of In this tutorial is to we will work through the creation an example of building a custom Xen CentOS 5.1 kernel with NFS root filesystem support for a CentOS 5 system.
== Obtaining the Kernel Sources ==
 
The first step in building a custom kernel involves the download and installation of the latest kernel sources. These can be obtained from the CentOS repository which is online at [http://mirror.centos.org/centos/5/updates/SRPMS http://mirror.centos.org/centos/5/updates/SRPMS].
 
kernel-<version>.el5.src.rpm
 
where <version> represents the version of kernel currently running on your system. This information can be obtained by running:
 
<pre>
uname -mr
</pre>
 
For example, at time of writing the latest kernel sources are contained in the package named kernel-2.6.18-53.1.14.el5.src.rpm.
 
Download the appropriate kernel sources for your environment to your home directory.
 
== Preparing for the Custom Kernel Build ==
 
While logged in as yourself (do not perform these tasks as root) it is necessary to perform th3e following steps in preparation for installing the sources:
 
<pre>
cd
mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo "%_topdir %(echo $HOME)/rpmbuild" > .rpmmacros
</pre>
 
Next, you will need to install (as root) the rpm-build package if it is not already installed on your system:
 
<pre>
su -
yum install rpm-build
</pre>
 
Be sure to exit from su to revert to your original user account.
 
Next, we can install the kernel sources from the rpm file downloaded previously:
 
<pre>
rpm -Uvh kernel-<version>.el5.src.rpm
</pre>
 
Once the packages are installed the sources need to unpacked using the ''rpmbuild'' command:
 
<pre>
cd ~/rpmbuild/SPECS
pmbuild -bp --target=`uname -m` kernel-2.6.spec
</pre>
1,798
edits

Navigation menu