Re: init(8) in jails

From: Antony T Curtis (antony.t.curtis_at_ntlworld.com)
Date: 01/30/04

  • Next message: Mike Makonnen: "Re: init(8) in jails"
    To: Dag-Erling Smørgrav <des@des.no>
    Date: Fri, 30 Jan 2004 22:44:01 +0000
    
    

    On Fri, 2004-01-30 at 17:02, Dag-Erling Smørgrav wrote:
    > Currently, the preferred mechanism to set up a virtual server in a
    > jail is 'jail /path/to/jail jail.host.name 1.2.3.4 /etc/rc'.
    >
    > How about modifying init instead and teach it how to run a jail? The
    > advantages of that approach would include the ability to send a signal
    > to a jailed init to have it run /etc/rc.shutdown inside the jail and
    > terminate the jail cleanly; currently, there is no clean method of
    > terminating a jail.

    Funnily enough, a couple of years ago, I modified init to run inside a
    jail... and then some terminals accessed different jails. All you need
    to do is to modify init to store it's pid in /var/run/init.pid and make
    tools which send signals to init read that file instead of assuming that
    init is pid=1.

    a quick and simple script to start/shutdown jails... and you can do fun
    stuff like all the console terminals are actually talking to a jailed
    session - gives an additional tier of confusion when someone tries to
    fiddle via the console. :D

    The 'root' non-jailed system can then run with practically no services
    running - just managing the jailed 'virtual servers'. I even went as far
    as using nmdm to be able to talk to the non-jailed system from one of
    the jailed instances (since the non-jail had no network service running
    at all)

    To reduplicate all the work is perhaps 2-4 hours. I don't have the
    source anymore because the box it was done on was wiped by my brother
    and he installed RedHat on it.

    Now, all someone needs to do is combine it with the vimage patch and you
    can have a nearly full virtual server system.

    -- 
    Antony T Curtis BSc     Unix Analyst Programmer
    http://homepage.ntlworld.com/antony.t.curtis/
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: Mike Makonnen: "Re: init(8) in jails"

    Relevant Pages

    • Re: rc.shutdown and jails
      ... >> send shutdown signals to all its compatriots in the jail etc. ... > need for an init type process anymore. ... We could also suport it even better with a few kernel assists. ...
      (freebsd-hackers)
    • initializing a task
      ... I'm having severe severe issues with my jail. ... out "init 2.87 booting", but then dies on the next fork. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)