Subject: Re: [vserver] Guest vserver stops mysteriously
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Tue, 12 Aug 2008 00:04:10 +0200

On Sat, Aug 09, 2008 at 12:44:06AM +0530, Ravi Kumar wrote:
> Hello Friends
> I am running Ubuntu (64-bit) as guest OS. For Vservers i run
> kernel-2.6.22.19 with vserver patch vs2.2.0.7  .
> 
> I want guest vservers to run on a partiton /dev/sda4 which i mount to
> /media/disk using the command :
> 
> sudo mount /dev/sda4 /media/disk
> 
> I dont use the normal ubuntu gui method to mount the disk as it mounts it
> with the option nodev, and i read somewhere that it may cause problems in
> vservers. Anyway before creating guest vservers i ran testme.sh and
> testfs.sh on /media/disk as root and all tests succeeded except xfs and jfs
> filesystems (in testfs.sh).
> 
> I downloaded yum sources from git and reset it to the version 3.2.4 (for
> which the patch is available for vservers), and after applying the patch,
> did 'make install' on host (ubuntu). Now it doesnt complain about using
> special hacks in yum.
> 
> The guest OS i built is centos5 (32-bit) using following command :
> 
> sudo linux32 vserver vserver1 build \
> -m yum \
> --rootdir /media/disk/vsrvs/vservers/.defaults/vdirbase \
> --pkgbase /media/disk/vsrvs/vservers/.pkg \
> --confdir /media/disk/vsrvs/vservers/vserver1 \
> --hostname vserver1.localdomain.com \
> --interface eth0:143.46.43.100 \
> -- \
> -d centos5
> 
> after that i tried to start the guest OS by the command :
> 
> cd /media/disk/vsrvs/vserver
> sudo vserver -v $PWD/vserver1 start
> 
> but it shown the following :
> 
> New network context is 40011
> Adding 143.46.43.100
> New security context is 40011
> Bringing up loopback interface:  Device lo does not seem to be present,

disable network related init scripts (and other scripts
like hardware setup or preparation)

> delaying initialization.
>                                                            [FAILED]
> Mounting other filesystems:                                [  OK  ]
> $

make sure that at least one service like cron or syslog
is enabled inside the guest (which will keep the guest alive)

> (you can see that it returned to shell prompt '$' without any furthur output
> or error).
> I also tried prepending 'linux32' to the command (after sudo), but got same
> message.
> 
> and if i try to 'enter' into vserver1 or check its 'status' it says that it
> is stopped. (i always give full path to vserver1, as it is not at its
> standard location)
> 
> after that i did descended into vserver1/interfaces folder and did this :
> 
> $ sudo mv 0 1
> $ sudo mkdir 0
> $ cd 0
> $ sudo bash -c "echo 'lo' > dev"
> $ sudo bash -c "echo '127.0.0.1' > ip"
> $ sudo bash -c "echo '255.0.0.0' > mask"
> $ sudo bash -c "echo 'lo' > name"
> $ cd ../..

don't do that :)

> (simply i moved the original interface '0' to '1' and created new interface
> '0' with dev as 'lo', ip as '127.0.0.1', mask as '255.0.0.0' and name as
> 'lo')
> 
> after that i again tried to run the vserver (with and without 'linux32'
> prepended and with -v option for verbosity in both cases) and it shown
> following :
> 
> RTNETLINK answers: File exists
> Bringing up loopback interface:  arping: socket: Operation not permitted
>                                                            [  OK  ]
> Mounting other filesystems:                                [  OK  ]
> $
> 
> (again as usual it drops back to shell prompt of the host, and checking
> 'status' of vserver1 says that it is stopped).
> 
> I would appreciate if anyone can give me some hint of the problem. I dont
> really need loopback device inside the guest (for now).

HTH,
Herbert