Subject: Re: [vserver] Single application per VServer ?
From: Corey Wright <undefined@pobox.com>
Date: Tue, 19 Jan 2010 09:59:02 -0600

On Tue, 19 Jan 2010 16:23:08 +0100
Shinkan <shinkan@gmail.com> wrote:

> 2010/1/19 Corey Wright <undefined@pobox.com>
> 
> >
> > like an application-specific chroot, but with the added functionality of
> > linux-vserver?
> >
> 
> Hi Corey,
> 
> Thanks for your try.
> That's what I need yeah, "a (nearly) bullet proof chroot" to launch one
> service.
> And I want to use VServer as my "bullet proof chroot".
> 
>  i think vcontext.
> >
> 
> I'll Google for it.
> 
> 
> >
> > > I mean, let's say I want to run Xorg in one VServer, and just that,
> > > how can I succeed by just knowing "I want to run Xorg on a VServer".
> > > If Xorg is too special, let's say I want to run a random binary of
> > > your choice.
> >
> > yeah, that's a pretty complex example to start with.
> >
> 
> I think so but I'll need this (one basic host with VServer support for
> instance, and one VServer just running X).
> 
>  an alternative, so as to not stray too far from the beaten path (usual
> use
> > case of "vserver <name> start" with plethora of online examples), is to
> > create a regular vserver and strip it down as people have done through
> > the ages for embedded or appliance usage (ie delete everything but your
> > application, its dependencies, and an init script).
> >
> 
> OK, but is there any assisted way of knowing exactly what I need to keep,
> just knowing the application I need ?

to find out what libraries are needed:

ldd $(which <application>)

note: that won't find run-time loaded libraries.

to find out what files are needed:

strace -f -o strace.log <application>
grep 'open\(' strace.log

that's off the top of my head, but i'm sure you can google for "linux
chroot howto" and leverage the online information about building general
chroot environments for building application-specific vservers.

corey

> -- 
> Pierre.
> "Sometimes when I'm talking, my words can't keep up with my thoughts. I
> wonder why we think faster than we speak. Probably so we can think
> twice." - Bill Watterson
> 
-- 
undefined@pobox.com