jails What does "starting a jail" actually accomplish?

When I setup jails, I have traditionally always used:

Code:
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";

Then service jail start ..., setup an rc service for my app/daemon, and service start it.

What am I actually accomplishing with 'booting' (if you would call it that) a full FreeBSD system? I know you can use anything for exec.start. Lets say if I just point it to a python app/daemon (/usr/local/bin/myapp.py) instead of /etc/rc. Would I be missing out on anything?
 
Short gist of it, a jail(8) is basically an OS level virtualization.



Lets say if I just point it to a python app/daemon (/usr/local/bin/myapp.py) instead of /etc/rc. Would I be missing out on anything?
Depends on your application, but it's very much possible to only start your application in a jail(8) without all the other OS "fluff". Just like it's possible for an application to run "directly" on iron.
 
Hi,

I have never done that before, but after reading /etc/rc a bit and trying hard to not confuse myself, by not running it, it looks like you should lose services/parameters/options that are normally passed to the jail's /etc/rc.conf , so for example services that are launched from inside the jail and VNET jails (routing, IP setting , default router).
An idea, may be you can try to pass them through the /etc/jail.conf.d/jail.conf , order matters I guess so I really don't know if it works.

I could be totally wrong so may be wait for another opinion.
This whole thing is interesting, let us know how it goes for you.

Good luck and have fun ;)
 
Back
Top