About this list Date view Thread view Subject view Author view Attachment view

From: Matthew Nuzum (matt.followers_at_gmail.com)
Date: Tue 05 Apr 2005 - 16:12:24 BST


I've started the process of creating vservers for testing the i/o limits. I
decided to document all of my steps. I'll continue this but it won't resume
until end of the week. I thought I should send the instructions along for
peer review. I've sent the message as HTML so that the modest formatting
will remain intact.

 

It's in 3 parts; parts A and B should apply to anyone installing vservers.
Part C, which details the actual creation of vservers is incomplete and
focused on debian and ubuntu versions of linux.

 

Part A details the installation of a plain vanilla kernel. Since most
distributions use modified kernels I explicitly included a step where you
try out a plain kernel without the vserver patches so that you'll know if
something breaks because of the plain vanilla kernel or because of the
vserver stuff.

 

By necessity, Part A will be somewhat vague because I don't even know what
kernel modules I need, let alone the ones you will need. If in doubt,
compile everything as a module (imho).

 

Here are the instructions. If someone wants to WIKI them, I'll update part C
in the wiki when I complete my steps. Otherwise, send me revision notes (cc
the mailing list please) and I'll include them in my final doc.

 

PART A: PREPARE A VANILLA KERNEL

1. download a vanilla kernel and unpack (i.e. tar jxvf
linux-2.6.11.5.tar.bz2)
2. cd into the kernel folder (i.e. cd linux-2.6.11.5)
3. Configure the kernel using your favorite utility (i.e. make config,
make menuconfig, make xconfig, make gconfig) NOTE: Leave out x25 (not even
as a module)
4. run make to build the kernel
5. run make install and make modules_install to install the kernel
modules
6. you may need to build the initrd.img file (i.e. mkinitrd -o
/boot/initrd.img-2.6.11.5 2.6.11.5)
7. you may need to add the kernel to your grub menu. This varies
dramatically between distributions. Leave one of your known good kernel
entries in the menu.
8. reboot, ensure to use the new vanilla kernel
9. If everything works ok, proceed with the vserver installation,
otherwise go back and fix the problems.

 

PART B: PREPARE A VSERVER ENABLED KERNEL

1. cd back one folder so that you are outside of the kernel source (cd
..)
2. download the vserver patch into the same folder that holds your
linux kernel source folder. (i.e. typing ls should show something like:
linux-2.6.11.5/ linux-2.6.11.5.tar.bz2 linux-vserver-1.9.5.tar.bz2)
3. uncompress the patch (i.e. tar jxvf linux-vserver-1.9.5.tar.bz2)
4. apply the patch to the kernel (i.e. patch -p0 <
patch-2.6.11.5-vs1.9.5.diff)
5. cd into the kernel folder (i.e. cd linux-2.6.11.5)
6. Configure the kernel with the relevant new changes by using make
oldconfig. Accept the default options unless you know a reason to do
otherwise
7. edit .config and change the line CONFIG_LOCALVERSION to something
like this: CONFIG_LOCALVERSION="-vserver" in order to differentiate your new
kernel from the vanilla kernel you made in part A
8. run make to build the new kernel
9. run make install to install the new kernel
10. run make modules_install to install the kernel modules
11. you may need to build the initrd.img file (i.e. mkinitrd -o
initrd.img-2.6.11.5-vs1.9.5-vserver 2.6.11.5-vs1.9.5-vserver)
12. you may need to add the kernel to your grub menu. This varies
dramatically between distributions. Leave one of your known good kernel
entries in the menu.
13. reboot, ensure to use the new vserver enabled kernel
14. If everything works ok, you can now create virtual servers

 

 

THIS SECTION BELOW IS INCOMPLETE! BEWARE! (ESPECIALLY AFTER STEP 9)

 

PART C: CREATE A VIRTUAL SERVER

1. download the tools for the vserver and unpack (i.e. tar jxvf
util-vserver-0.30.204.tar.bz2)
2. cd into the tools folder (i.e. cd util-vserver-0.30.204)
3. run ./configure to configure the tools. You may have to resolve
dependency problems at this point. I had a few but the instructions provided
with the error helped in all cases.
4. run make and if all works well, run make check to confirm things are
good.
5. if all is well, install the tools by running make install

* NOTE: At this point, the installation will become somewhat
distribution specific. I am using Ubuntu 4.1 (Warty) as the host and I am
also using it as the guest operating system. Fedora core has the best
support so you may want to use the current release of Fedora for both your
host and guest. If you want Ubuntu/Debian, these instructions will work for
you:

6. Ensure you have the debootstrap package installed (i.e. apt-get
install debootstrap)
7. mkdir /vservers (if your / partition is low on disk space, consider
either mounting new filesystem on /vservers or creating a vservers folder on
another filesystem and linking it to /vservers - you will need a lot of disk
space here)
8. Create the new ubuntu disk image. If you want to use debian, google
for debootstrap and you should see alternate syntax to use for the
debootstrap program. (i.e. to create a virtual server named "vsa" with the
ip address "192.168.1.99" and the host name "vsa.mynetwork.com" use this
command: vserver vsa build -m debootstrap --hostname vsa.mynetwork.com
--netdev eth0 --interface 192.168.1.99/24 -- -d warty -m
http://archive.ubuntulinux.org/ubuntu)
9. After much installing and configuring you will be prompted with a
message similar to "I: Base system installed successfully." which means your
vserver is setup.
10. Start the vserver named "vsa" by running the command vserver vsa
start
11. Enter the vserver named "vsa" by issuing the command vserver vsa
enter

 

 

-- 

Matthew Nuzum <matt_at_followers.net>

www.followers.net - Makers of "Elite Content Management System"

View samples of Elite CMS in action by visiting

http://www.elitecms.com <http://www.elitecms.com/>

_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 05 Apr 2005 - 16:12:57 BST by hypermail 2.1.3