Editing
Msg09330.html
From Linix VServer
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
----- [<nowiki/>[[msg09329.html|Date Prev]]][<nowiki/>[[msg09331.html|Date Next]]][<nowiki/>[[msg09329.html|Thread Prev]]][<nowiki/>[[msg09331.html|Thread Next]]][<nowiki/>[[index.html#09330|Date Index]]][<nowiki/>[[threads.html#09330|Thread Index]]] <span id="vserver-partial-vserver-1.9.5-setup-instructions"></span> = [Vserver] partial vserver 1.9.5 setup instructions = ----- * '''From:''' Matthew Nuzum * '''Date:''' Tue, 5 Apr 2005 17:12:28 +0200 (CEST) ----- {| class="wikitable" width="100%" |- | style="a: link { color"| <div class="Section1"> <span style="font-size:10.0pt;font-family:Arial;color:#333333">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.</span> <span style="font-size:10.0pt;font-family:Arial;color:#333333"> </span> <span style="font-size:10.0pt;font-family:Arial;color:#333333">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. </span> <span style="font-size:10.0pt;font-family:Arial;color:#333333"> </span> <span style="font-size:10.0pt;font-family:Arial;color:#333333">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.</span> <span style="font-size:10.0pt;font-family:Arial;color:#333333"> </span> <span style="font-size:10.0pt;font-family:Arial;color:#333333">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).</span> <span style="font-size:10.0pt;font-family:Arial;color:#333333"> </span> <span style="font-size:10.0pt;font-family:Arial;color:#333333">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.</span> <span style="font-size:10.0pt;font-family:Arial;color:#333333"> </span> <span style="font-size: 12.0pt">PART A: PREPARE A VANILLA KERNEL</span> # <span style="font-size:12.0pt">download a vanilla kernel and unpack (i.e. </span><span style="font-family:"Courier New"; color:navy">tar jxvf linux-2.6.11.5.tar.bz2</span>) # <span style="font-size:12.0pt">cd into the kernel folder (i.e. </span><span style="font-family:"Courier New"; color:navy">cd linux-2.6.11.5</span>) # <span style="font-size:12.0pt">Configure the kernel using your favorite utility (i.e. </span><span style="font-family:"Courier New";color:navy">make config</span>, <span style="font-family:"Courier New"; color:navy">make menuconfig</span>, <span style="font-family:"Courier New";color:navy">make xconfig</span>, <span style="font-family:"Courier New";color:navy">make gconfig</span>) NOTE: Leave out x25 (not even as a module) # <span style="font-size:12.0pt">run </span><span style="font-family:"Courier New";color:navy">make</span> to build the kernel # <span style="font-size:12.0pt">run </span><span style="font-family:"Courier New";color:navy">make install</span> and <span style="font-family:"Courier New";color:navy">make modules_install</span> to install the kernel modules # <span style="font-size:12.0pt">you may need to build the initrd.img file (i.e. </span><span style="font-family:"Courier New"; color:navy">mkinitrd -o /boot/initrd.img-2.6.11.5 2.6.11.5</span>) # <span style="font-size:12.0pt">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.</span> # <span style="font-size:12.0pt">reboot, ensure to use the new vanilla kernel</span> # <span style="font-size:12.0pt">If everything works ok, proceed with the vserver installation, otherwise go back and fix the problems.</span> <span style="font-size: 12.0pt"> </span> <span style="font-size: 12.0pt">PART B: PREPARE A VSERVER ENABLED KERNEL</span> # <span style="font-size:12.0pt">cd back one folder so that you are outside of the kernel source (</span><span style="font-family:"Courier New";color:navy">cd ..</span>) # <span style="font-size:12.0pt">download the vserver patch into the same folder that holds your linux kernel source folder. (i.e. typing </span><span style="font-family:"Courier New"; color:navy">ls</span> should show something like: linux-2.6.11.5/ linux-2.6.11.5.tar.bz2 linux-vserver-1.9.5.tar.bz2) # <span style="font-size:12.0pt">uncompress the patch (i.e. </span><span style="font-family:"Courier New"; color:navy">tar jxvf linux-vserver-1.9.5.tar.bz2</span>) # <span style="font-size:12.0pt">apply the patch to the kernel (i.e. </span><span style="font-family:"Courier New"; color:navy">patch -p0 < patch-2.6.11.5-vs1.9.5.diff</span>) # <span style="font-size:12.0pt">cd into the kernel folder (i.e. </span><span style="font-family:"Courier New"; color:navy">cd linux-2.6.11.5</span>) # <span style="font-size:12.0pt">Configure the kernel with the relevant new changes by using make oldconfig. Accept the default options unless you know a reason to do otherwise</span> # <span style="font-size:12.0pt">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</span> # <span style="font-size:12.0pt">run </span><span style="font-family:"Courier New";color:navy">make</span> to build the new kernel # <span style="font-size:12.0pt">run </span><span style="font-family:"Courier New";color:navy">make install</span> to install the new kernel # <span style="font-size:12.0pt">run </span><span style="font-family:"Courier New";color:navy">make modules_install</span> to install the kernel modules # <span style="font-size:12.0pt">you may need to build the initrd.img file (i.e. </span><span style="font-family:"Courier New"; color:navy">mkinitrd -o initrd.img-2.6.11.5-vs1.9.5-vserver 2.6.11.5-vs1.9.5-vserver</span>) # <span style="font-size:12.0pt">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.</span> # <span style="font-size:12.0pt">reboot, ensure to use the new vserver enabled kernel</span> # <span style="font-size:12.0pt">If everything works ok, you can now create virtual servers</span> <span style="font-size:10.0pt;font-family:Arial;color:#333333"> </span> <span style="font-size:10.0pt;font-family:Arial;color:#333333"> </span> <span id="this-section-below-is-incomplete-beware-especially-after-step-9"></span> = '''<span style="font-size:16.0pt">THIS SECTION BELOW IS INCOMPLETE! BEWARE! (ESPECIALLY AFTER STEP 9)</span>''' = <span style="font-size: 12.0pt"> </span> <span style="font-size: 12.0pt">PART C: CREATE A VIRTUAL SERVER</span> # <span style="font-size:12.0pt">download the tools for the vserver and unpack (i.e. </span><span style="font-family:"Courier New";color:navy">tar jxvf util-vserver-0.30.204.tar.bz2</span>) # <span style="font-size:12.0pt">cd into the tools folder (i.e. </span><span style="font-family:"Courier New"; color:navy">cd util-vserver-0.30.204</span>) # <span style="font-size:12.0pt">run </span><span style="font-family:"Courier New";color:navy">./configure</span> 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. # <span style="font-size:12.0pt">run </span><span style="font-family:"Courier New";color:navy">make</span> and if all works well, run <span style="font-family:"Courier New";color:navy">make check</span> to confirm things are good. # <span style="font-size:12.0pt">if all is well, install the tools by running </span><span style="font-family:"Courier New"; color:navy">make install</span> #* <span style="font-size:12.0pt">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:</span> # <span style="font-size:12.0pt">Ensure you have the debootstrap package installed (i.e. </span><span style="font-family:"Courier New";color:navy">apt-get install debootstrap</span>) # <span style="font-size:12.0pt;font-family:"Courier New";color:navy">mkdir /vservers</span> (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) # <span style="font-size:12.0pt">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: </span><span style="font-family:"Courier New"; color:navy">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</span>) # <span style="font-size:12.0pt">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.</span> # <span style="font-size:12.0pt">Start the vserver named "vsa" by running the command vserver vsa start</span> # <span style="font-size:12.0pt">Enter the vserver named "vsa" by issuing the command vserver vsa enter</span> <span style="font-size:10.0pt;font-family:Arial;color:#333333"> </span> <span style="font-size:10.0pt;font-family:Arial;color:#333333"> </span> <span style="font-size:10.0pt;font-family:Verdana;color:#333333">-- </span> <span style="font-size:10.0pt;font-family:Verdana;color:#333333">Matthew Nuzum <matt@xxxxxxxxxxxxx></span> <span style="font-size:10.0pt;font-family:Verdana;color:#333333">www.followers.net - Makers of “Elite Content Management System”</span> <span style="font-size:10.0pt;font-family:Verdana;color:#333333">View samples of Elite CMS in action by visiting</span> <span style="font-size:10.0pt;font-family:Verdana;color:#333333">[http://www.elitecms.com/ http://www.elitecms.com]</span> <span style="font-size: 12.0pt"> </span> </div> |} ----- * Prev by Date: '''[[msg09329.html|[Vserver] a couple of beginner questions]]''' * Next by Date: '''[[msg09331.html|[Vserver] some sched question]]''' * Previous by thread: '''[[msg09329.html|[Vserver] a couple of beginner questions]]''' * Next by thread: '''[[msg09331.html|[Vserver] some sched question]]''' * Index(es): ** [[index.html#09330|'''Date''']] ** [[threads.html#09330|'''Thread''']]
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information