From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.54) id 1FKCAJ-0001D5-Ne for garchives@archives.gentoo.org; Fri, 17 Mar 2006 10:26:40 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5.20060308/8.13.5) with SMTP id k2HAQaa6020381; Fri, 17 Mar 2006 10:26:36 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30]) by robin.gentoo.org (8.13.5.20060308/8.13.5) with ESMTP id k2HAQYlN023022 for ; Fri, 17 Mar 2006 10:26:35 GMT Message-Id: <200603171026.k2HAQYlN023022@robin.gentoo.org> Received: from lark.gentoo.osuosl.org ([140.211.166.177] helo=lark) by smtp.gentoo.org with smtp (Exim 4.54) id 1FKCAD-0006Hc-Tj for gentoo-doc-cvs@lists.gentoo.org; Fri, 17 Mar 2006 10:26:34 +0000 Received: by lark (sSMTP sendmail emulation); Fri, 17 Mar 2006 10:26:33 +0000 From: "Xavier Neys" Date: Fri, 17 Mar 2006 10:26:33 +0000 To: gentoo-doc-cvs@lists.gentoo.org Subject: [gentoo-doc-cvs] cvs commit: vserver-howto.xml Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-doc-cvs@gentoo.org Reply-to: docs-team@lists.gentoo.org X-Archives-Salt: 72b55109-e000-41b2-b8b8-cae8c60ea40b X-Archives-Hash: 17349f4df35e3835304551738d946912 neysx 06/03/17 10:26:33 Modified: vserver-howto.xml Log: #Update from #126491 Revision Changes Path 1.7 xml/htdocs/doc/en/vserver-howto.xml file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/vserver-howto.xml?rev=1.7&content-type=text/x-cvsweb-markup&cvsroot=gentoo plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/vserver-howto.xml?rev=1.7&content-type=text/plain&cvsroot=gentoo diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/vserver-howto.xml.diff?r1=1.6&r2=1.7&cvsroot=gentoo Index: vserver-howto.xml =================================================================== RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/vserver-howto.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- vserver-howto.xml 13 Mar 2006 18:55:37 -0000 1.6 +++ vserver-howto.xml 17 Mar 2006 10:26:33 -0000 1.7 @@ -1,5 +1,5 @@ - + @@ -21,8 +21,8 @@ -1.4 -2006-03-13 +1.5 +2006-03-17 Introduction @@ -70,7 +70,7 @@ - util-vserver, vserver utils + util-vserver The util-vserver package contains all programs necessary for maintaining your virtual servers @@ -103,8 +103,7 @@ Linux VServer ---> [ ] Enable Legacy Kernel API -(Do not set!) - [ ] Disable Legacy Networking Kernel API + [*] Disable Legacy Networking Kernel API (Highly recommended) [*] Enable Proc Security [*] Enable Hard CPU Limits @@ -114,8 +113,10 @@ -If you are using reiserfs as your filesystem, you will need to enable extended -attributes for reiserfs in your kernel config. +If you are using reiserfs as filesystem on the partition where guest images are +stored, you will need to enable extended attributes for reiserfs in your +kernel config and additionally add the attrs option in +/etc/fstab.
@@ -124,13 +125,8 @@
   [*]   ReiserFS extended attributes
 
-

-Additionally, you will need to specify the attrs option in -/etc/fstab for your vserver partition: -

-
-/dev/hdb /vserver reiserfs noatime,attrs 0 0
+/dev/hdb /vservers reiserfs noatime,attrs 0 0
 

@@ -143,7 +139,7 @@ # make (Installing) # make modules_install -# cp arch/i386/boot/bzImage /boot/kernel-<KERNELVERSION>-vserver-<VSERVERVERSION> +# cp arch/<arch>/boot/bzImage /boot/kernel-<KERNELVERSION>-vserver-<VSERVERVERSION> (Edit bootloader config file as required and) # reboot @@ -156,23 +152,26 @@

To maintain your virtual servers you need the util-vserver package which -contains all necessary programs and many usefull features. +contains all necessary programs and many useful features. Be aware that there +is also a package called vserver-utils. It is a new incarnation of the +user-space implementation of the VServer kernel API, but not yet usable for +production use.

-The tools and features used in this HowTo require ->=sys-apps/util-vserver-0.30.208-r3. You may have to keyword it first. +This version of the howto requires features only available in +>=sys-apps/util-vserver-0.30.210-r6. You may have to keyword/upgrade +it first. -
+
 # emerge util-vserver
 

You have to run the vprocunhide command after every reboot in order to -setup /proc permissions correctly for vserver use. An init script has -been installed by util-vserver. To use it you should add it to a -runlevel: +setup /proc permissions correctly for vserver use. An init script +has been installed by util-vserver. To use it you should add it to a runlevel:

@@ -180,8 +179,13 @@
 # /etc/init.d/vservers start
 
+ +This init script will also start your default vservers. Read below for more +information. + +

-The vshelper script is used to correctly stop and restart virtual servers. You +The vshelper script is used to restart virtual servers correctly. You have to tell the kernel where the vshelper script is located:

@@ -219,7 +223,7 @@ --hostname gentoo \ --context 1253 \ --interface eth0:192.168.1.253/24 \ - stage3 /path/to/stage3-tarball.tar.bz2 + stage3 /path/to/stage3-<arch>-<date>.tar.bz2 <arch>
@@ -247,7 +251,7 @@
 # cd /vservers/gentoo-template
-# tar cjvpf ../gentoo-template.tar.bz2 ./
+# tar cjvpf ../gentoo-template-<arch>-<date>.tar.bz2 ./
 

@@ -260,12 +264,12 @@ --hostname myguest \ --context 1252 \ --interface eth0:192.168.1.252/24 \ - template ./gentoo-template.tar.bz2 + template ./gentoo-template-<arch>-<date>.tar.bz2 <arch> -You should use a shared portage tree for your guests to keep guests small in -size. Edit /etc/vservers/myguest/fstab and uncomment the entries +You should use a shared portage tree to keep guests small in size. Edit +/etc/vservers/myguest/fstab and uncomment the entries for /usr/portage and /usr/portage/distfiles. Guests will have read-only access to /usr/portage and read-write access to /usr/portage/distfiles. @@ -302,13 +306,140 @@ + + + +Maintenance made easy +

+Start guests on boot + + +

+You can start certain guests during boot. Each guest can be assigned a MARK. +Now everything you have to do is configure these MARKs in the guests +configuration and tell the init script to run all MARKed guests. +

+ +
+(Do this for every guest you want to start)
+# mkdir -p /etc/vservers/myguest/apps/init
+# echo "default" > /etc/vservers/myguest/apps/init/mark
+
+ + +Since all guests marked with "default" are started by default, nothing more has +to be done. If you have different marks you should also update +/etc/conf.d/vservers. + + + +
+
+Gentoo goodies + + +

+The util-vserver ebuild has installed some goodies for Gentoo guests. You know +vserver-new from the previous chapter. In this chapter, you will learn +how to use vesync and vemerge to keep portage in sync as well as +vupdateworld and vdispatch-conf to update guests. +

+ + +
+
+Keep portage in sync + + +

+The script vesync will help you to keep the metadata cache and overlays +in sync. vemerge is a simple wrapper for emerge in guests. +

+ +
+(Sync metadata for 'myguest')
+# vesync myguest
+(Sync metadata for all guests)
+# vesync -a
+(Sync metadata for all guests except 'myguest')
+# vesync -a -e myguest
+(Sync 'myoverlay' for all guests)
+# vesync -a \
+  --overlay /usr/local/overlays/myoverlay \
+  --overlay-host rsync://rsync.myhost.com/myoverlay \
+  --overlay-only
+(emerge app-editors/vim in 'myguest')
+# vemerge myguest app-editors/vim -va
+
+ + +This script requires you to have a shared portage tree. + + + +
+
+Update guests + + +

+Gentoo guests can share packages to save compilation time. In order to use +shared packages, you have to create a central directory for packages on the +host. We will use /var/cache/vpackages on the host and mount it +to /usr/portage/packages in every guest. +

+ +
+# mkdir -p /var/cache/vpackages
+# $EDITOR /etc/vservers/myguest/fstab
+(Add this line at the end)
+/var/cache/vpackages /usr/portage/packages none bind,rw 0 0
+
+ +

+Now you can use vupdateworld to update every guest. The command is +equivalent to something like emerge --deep --update --newuse world +depending on command line options. +

+ +
+(Pretend update for 'myguest')
+# vupdateworld -p myguest
+(Update 'myguest' using binary packages)
+# vupdateworld -k myguest
+(Update all guests using binary packages)
+# vupdateworld -ka
+
+ + +In order to get binary packages you can either use PORTAGE_BINHOST (see man +make.conf) or set FEATURES="buildpkg" in one or more guests. + + +

+After a successful update you can easily update all configuration files with +vdispatch-conf. It is a simple wrapper for dispatch-conf and +behaves exactly the same. +

+ +
+(Update configuration files for 'myguest')
+# vdispatch-conf myguest
+(Update configuration files for all guests)
+# vdispatch-conf -a
+
+ + +
+
Contact

-Please feel free to contact the author or file a bug on Bugzilla in case of any problems. +Please feel free to contact the author or +file a bug on Bugzilla in case of any +problems.

-- gentoo-doc-cvs@gentoo.org mailing list