From: Gilles (gilles_at_harfang.homelinux.org)
Date: Wed 09 Mar 2005 - 21:29:31 GMT
[Until we have a "plug-n-play" debian package with the latest version
of vserver patch and tools,] I'm again trying to configure "Debian"
vservers on Debian from source.
Compiling kernel 2.6.11, patched with "patch-2.6.11-vs1.9.5-rc1.diff",
and util-vserver-0.30.203 went fine.
I built a Debian "template" vserver with
vserver template build -m debootstrap \
--hostname template \
--netdev dummy0 --interface 192.168.83.99/24 \
--context 99 -- -d sarge
The procedure completed fine too. But problems remains, some of which
I had mentioned a few weeks ago.
Ideally, the "template" should be with the minimum functionality, with
everything that's necessary (to make it comfortable to install the server
applications) and nothing that comes in the way of vserver (i.e. all
hardware- and kernel-related packages).
So here is a list of steps that could be added to the "vserver build"
script to come closer to such a ready-to-use vserver environment:
1. Removing dispensable packages:
pciutils fdutils ipchains makedev ppp pppconfig pppoe pppoeconf
dhcp-client console-common console-data console-tools klogd sysklogd
[Note: klogd still triggers that cpu-hogging behaviour, which makes it
*indispensable* to remove...]
2. Installing indispensable packages:
3. Prepare for package installation:
(a) Copy the contents of the host's "/etc/apt/sources.list"
(b) Run "apt-get update"
4. Network interfaces
(a) In the "/etc/init.d/reboot" script: Remove the "-i" option (to avoid
the guest trying to deconfigure the network interfaces upon halting).
(b) Remove "spurious" links to scripts that will try to configure the
update-rc.d -f ifupdown remove
update-rc.d -f ifupdown-clean remove
update-rc.d -f networking remove
5. ... [Not yet finished.]
Some more questions:
(a) Should I remove the "mount" package (to suppress any attempt by the vserver
guest to try such things)? [The Debian package management issues a strong
warning when uninstalling it (package is "essential").]
Or should I only remove the symlinks as for the networking scripts?
(b) At "vserver template stop", the following error is printed:
Rebooting... /usr/local/util-vserver/sbin/vserver: line 740: test: too many arguments
but there are only 273 lines in that file!
(c) Inside the vserver, typing "mount" shows
/dev/hdv1 on / type ufs (defaults)
none on /proc type proc (defaults)
none on /tmp type tmpfs (size=16m,mode=1777)
none on /dev/pts type devpts (gid=5,mode=620)
The contents of "/etc/vservers/template/fstab" is:
none /proc proc defaults 0 0
none /tmp tmpfs size=16m,mode=1777 0 0
none /dev/pts devpts gid=5,mode=620 0 0
So I wonder: Where does that "/dev/hdv1" entry come from?
And rightly, when stopping the vserver, I get the error:
umount: /dev/hdv1: not found
(d) The file "/etc/hostname", inside the vserver, contains the host's name instead of the
guest name. Is it supposed to be so? ["uname -n" provides the right name.]
(e) I must be missing something with "vprocunhide" because I can't seem to make it
visible... I looked at
but the only reference is in "/etc/vservers/.defaults/apps/vprocunhide", which
does not appear in my config directory.
Thanks for your patience.
Vserver mailing list