~ubuntu-branches/ubuntu/quantal/aufs/quantal

« back to all changes in this revision

Viewing changes to sample/linux-vserver.txt

  • Committer: Bazaar Package Importer
  • Author(s): Julian Andres Klode
  • Date: 2008-04-01 18:26:37 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080401182637-ujuqq47eiggw4y5w
Tags: 0+20080401-1
* New upstream snapshot
  - Remove bashisms in script (Closes: #471288)
* debian/conf.mk, linux-patch-aufs.kpatches.sysfs_get_dentry:
  - Remove support for this patch, no longer used
* debian/conf.mk:
  - Add hacks for arm to armel (Closes: #473767)
* debian/control:
  - Add Dm-Upload-Allowed
* debian/copyright:
  - Use http://wiki.debian.org/Proposals/CopyrightFormat
* debian/linux-patch-aufs.kpatches.{splice,put_filp}:
  - Add support for Kernel 2.6.24 (and 2.6.25)
* debian/patches:
  - 01_vserver_apparmor: Update patch
  - 06_rt: Add patch for realtime kernel
  - 07_splice_hack: Add hack to support splice operations (Closes: #473430)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
A sample procedure for Linux-VServer and aufs on plain Debian Etch.
3
3
Junjiro Okajima
4
4
 
5
 
# $Id: linux-vserver.txt,v 1.6 2007/11/19 01:09:25 sfjro Exp $
 
5
# $Id: linux-vserver.txt,v 1.7 2008/02/18 04:42:22 sfjro Exp $
6
6
 
7
7
o Introduction
8
8
Linux-Vserver (http://linux-vserver.org) is another solution for
10
10
It doesn't provide hardware emulation, bios emulation nor individual
11
11
kernel for virtual machines, but it provides Virtual Private
12
12
Server(VPS) aka Security Context.
13
 
VPS shares the hardware among the host and othere VPS, and runs on a
14
 
host kernel, and finally it provides an inidividual virtual server.
 
13
VPS shares the hardware among the host and other VPS, and runs on a
 
14
host kernel, and finally it provides an individual virtual server.
15
15
A root filesystem for VPS is a normal directory or mount-point, unlike
16
16
QEMU's fs-image file.
17
17
If you can admit sharing everything under OS among VPSs and the host,
81
81
  + vs1 and vs2 must be described in /etc/hosts.
82
82
  + disable some init scripts around the management for a hardware, as
83
83
    vserver-debiantools package does.
84
 
  + /srv/plain/etc/hostname is dummy. it will be overrided by
 
84
  + /srv/plain/etc/hostname is dummy. it will be overrode by
85
85
    /srv/vs[12].rw/etc/hostname later.
86
86
  + in this sample, the packages are handled or centralized on host.
87
87
  + disable IPv6 in proftpd, if necessary (on unnecessary).
103
103
# echo UseIPv6 off >> /etc/proftpd/proftpd.conf
104
104
# exit
105
105
 
106
 
- customize apache2 and proftpd sevices anyway you like here. but
 
106
- customize apache2 and proftpd services anyway you like here. but
107
107
  remember, you need to specify IP address to every service in
108
108
  linux-vserver, instead of wildcard (0.0.0.0).
109
109
 
110
110
 
111
 
o Build VPS root directory, /var/lib/vservsers/vs[12]
 
111
o Build VPS root directory, /var/lib/vservers/vs[12]
112
112
- build VPS
113
113
$ sudo vserver vs1 build -m skeleton --hostname vs1 --interface eth0:192.168.1.101/24
114
114
$ sudo vserver vs2 build -m skeleton --hostname vs2 --interface eth0:192.168.1.102/24
115
115
 
116
116
- append these lines to /etc/fstab on host, in order to mount the root
117
 
  direcotry for VPSs automatically at boot time.
 
117
  directory for VPSs automatically at boot time.
118
118
none  /var/lib/vservers/vs1      aufs defaults,br:/srv/vs1.rw:/srv/plain 0 0
119
119
/home /var/lib/vservers/vs1/home ext3 defaults,bind,ro                   0 0
120
120
none  /var/lib/vservers/vs2      aufs defaults,br:/srv/vs2.rw:/srv/plain 0 0
125
125
 
126
126
 
127
127
o Setup VPSs
128
 
- set thier hostname.
 
128
- set their hostname.
129
129
 
130
130
- on vs1,
131
131
  + configure apache2 to start automatically.
148
148
# echo default > /etc/vservers/vs1/apps/init/mark
149
149
# echo default > /etc/vservers/vs2/apps/init/mark
150
150
 
151
 
- you can setup the resource limit, scheduling plicy or something for
 
151
- you can setup the resource limit, scheduling policy or something for
152
152
  every VPS, via /etc/vservers/vs[12].
153
153
  cf. http://www.nongnu.org/util-vserver/doc/conf/configuration.html
154
154