Re: [Vserver] vserver not starting

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Thu 01 Jun 2006 - 18:08:12 BST
Message-ID: <20060601170812.GD28375@MAIL.13thfloor.at>

On Wed, May 31, 2006 at 01:18:14PM +0530, varun wrote:
> On Tue, 2006-05-30 at 18:09 +0200, Herbert Poetzl wrote:
> > On Mon, May 29, 2006 at 07:35:33PM +0530, varun wrote:
> > > Hello All,
> > >
> > > I new to the list.
> > >
> > > My vserver is not starting.
> > >
> > > My distro is CentOS 4.3 upgraded.
> > >
> > > and
> > >
> > > [root@vserver ~]# uname -r
> > > 2.6.14.3-vs2.0.1
> >
> > it would not hurt to update to a recent kernel
> > and patches (e.g. 2.6.16.18-vs2.0.2-rc21 or so)
> > but it should work with this one too ...
> >
> > > and
> > >
> > > [root@vserver ~]# /sbin/vserver boing start
> >
> > first, what tools do you use there, and how was
> > the guest created?
>
>
>
> These are the steps I followed :
>
> Now we have to install the vserver binary packages. These are the
> userland utilities to control virtual servers:
>
> # wget
> http://www.13thfloor.at/vserver/s_rel26/v2.01/util-vserver-0.30.209.tar.gz
>
> # tar -zxvf util-vserver-0.30.209.tar.gz
>
> # cd util-vserver-0.30.209
>
> At this point, make sure you have installed dietlibc and beecrypt/-devel
> using the following command:
>
> # yum install -y dietlibc beecrypt-devel
>
> Now build and install the util-vserver tools. Here's an example
> (installing tools in /lib and /sbin and also /etc/init.d):
>
> # cd /usr/src/util-vserver-0.30.209
>
> # ./configure --prefix= --sysconfdir=/etc
>
> # make && make install && make install-distribution
>
>
> Testing
> Test if all went well:
>
> # wget http://vserver.13thfloor.at/Stuff/SCRIPT/testme.sh
>
> # chmod 700 testme.sh;./testme.sh
>
> If all went well you get something like this:
>
> Linux-VServer Test [V0.15] Copyright (C) 2003-2006 H.Poetzl
> chcontext is working.
> chbind is working.
> Linux 2.6.14.3-vs2.0.1 #1 SMP Thu Mar 2 12:45:32 IST 2006 i686
> Ea 0.30.209 273/glibc (DSa) <compat,v11,v13,fscompat,net,oldproc,olduts>
> VCI: 0002:0001 273 03110036 (TbLgnPD)
> ---
> [000]# succeeded.
> [001]# succeeded.
> [011]# succeeded.
> [031]# succeeded.
> [101]# succeeded.
> [102]# succeeded.
> [201]# succeeded.
> [202]# succeeded.
>
>
> The Files
> /vservers/
>
> Home directory for the vservers
>
>
> /etc/vservers.conf
>
>
> basic config file (not much to see
> there)
>
>
> /etc/vservers
>
>
> Hold the config directories for each
> virtual server
>
>
> /usr/sbin/vserver
>
>
> Utility to interact, build, start,
> stop, enter, etc the vservers
>
>
> /usr/lib/util-vserver/vshelper
>
>
> Another utility to control how
> vservers function
>
>
> /usr/lib/util-vserver
>
>
> Main scripts/functions/etc
>
>
> Setting Up The Virtual Servers
> Creating virtual servers is pretty simple from here on. The following
> lays it out for you:
>
> First up you have to create a template from your host system. For that
> you have to take a dump of the entire file system minus two
> directories, /proc, and /dev:
>
> # mkdir /vservers/template/
>
> # dump 0f - /usr | (cd /vservers/template/ && restore rf -)
>
> Similarly take a dump for the following directories:
>
> /usr /lib /var /etc /opt and /root.

this only makes sense if you have separate
partitions for /usr /lib /var /etc /opt and /root.

please double check that your template looks
'sane' i.e. similar (or identical) to the host
system for the abovementioned directories as
well as for the /tmp and /var/tmp dirs

> Now you can clean up the template to improve on the speed and size of
> the vservers.
>
> create a vserver based on the following command:
>
> # /sbin/vserver <VSERVER_NAME> build -m <BUILD_METHOD>
> --hostname <VSERVER_HOSTNAME>
> --interface <VSERVER_NAME>=<NET_DEVICE>:<IP>/<CIDR>
>
> Here's a real example:
>
> # /sbin/vserver boing build -m skeleton --hostname boing.lk.com
> --interface boing=eth0:192.168.1.10/24
>
> So, our first virtual server will have the following information:
>
> VSERVER_NAME > boing
> FQDN > boing.lk.com
> NET_DEVICE > eth0
> IP > 192.168.1.10
> CIDR > 24 (255.255.255.0)
> BUILD_METHOD > skeleton
>
> Now you have to populate your new vserver with the data from your
> template:
>
> # cp -a /vservers/template/. /vservers/boing/
>
> Edit the /etc/hosts and /etc/resolv.conf in the vserver to reflect the
> networking settings of your vserver:
>
> # vi /vservers/boing/etc/hosts
>
> # vi /vservers/boing/etc/resolv.conf
>
> Starting The Virtual Servers
> We are now doen setting up the vservers. It is now time to keep those
> fingers crossed and start our new vserver:
>
> # /sbin/vserver boing start
>
> --------------------------------------- end if file -----------------

excepth for the (relatively important) detail
above, the procedure seems sound and should work

please note that I'd suggest to use a recent
kernel and tools nevertheless ...

HTH,
Herbert

> > > secure-mount: chdir("/tmp"): No such file or directory
> >
> > looks like some /tmp either on the guest or on
> > the host is missing, or maybe some permissions
> > are not set properly ...
> >
> > > /etc/vservers/boing/fstab:2:1: failed to mount fstab-entry
> >
> > this is likely the result of /tmp not being
> > there so mounting the tmpfs fails
> >
> > > find: var/run: No such file or directory
> >
> > similar for var/run as it seems
> >
> > > fakerunlevel: open("/var/run/utmp"): No such file or directory
> > >
> > >
> > > Failed to start vserver 'boing'
> > >
> > > howto fix this errors?
> >
> > first, let's figure the tool version and how
> > you installed the guest ...
> >
> > best,
> > Herbert
> >
> > > Thanks
> > >
> > > Varun
> > > _______________________________________________
> > > Vserver mailing list
> > > Vserver@list.linux-vserver.org
> > > http://list.linux-vserver.org/mailman/listinfo/vserver
> >
> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Thu Jun 1 18:09:20 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 01 Jun 2006 - 18:09:24 BST by hypermail 2.1.8