Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Nov 2013 13:44:32 +0100
From:      Michael Gmelin <freebsd@grem.de>
To:        Kristen Nielsen <krn@krn.dk>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: FreeBSD 9.1-Rel: Jail-rc startup of vnet jails with new configuration syntax
Message-ID:  <20131107134432.2530dce7@bsd64.grem.de>
In-Reply-To: <527B86E2.5020907@krn.dk>
References:  <527B86E2.5020907@krn.dk>

next in thread | previous in thread | raw e-mail | index | archive | help


On Thu, 07 Nov 2013 13:26:10 +0100
Kristen Nielsen <krn@krn.dk> wrote:

> Hi freebsd-virtualization list
> 
> I am trying to figure out how to start configured jails within
> FreeBSD 9.1Release at boot time.
> I am using new C-style jail configuration syntax in /etc/jail.conf.
> all jail starts successfully when i do a jail -c from the commandline.
> 
> I am trying to configure jails to start at boot time using the
> features in the /etc/rc.conf file.
> 
> in /etc/rc.conf at base host i have
> jail_enable="YES"
> jail_list=" jail1 jail2 jail3 "
> 
> and no more jail related lines, evereything else is placed into the
> jail configuration (C-style) file.
> 
> running "service jail start":
> Configuring jails:.
> Starting jails:/etc/rc.d/jail: ERROR: jail: No hostname has been
> defined for jail1
> 
> Looking into the /etc/rc.d/jail script it seems it expects that the 
> /etc/rc.conf contains old style jail configuration statement like
> 
> jail_<jname>_hostname="jail1"
> etc.
> 
> I have looked at the patch at: 
> http://wiki.polymorf.fr/index.php/Howto:FreeBSD_jail_vnet
> but it also uses the old style (rc.config) jail configuration format, 
> but with extended number of parameters. The patch is dated before the 
> 9-1 release where the C-style jail configuration syntax was taken
> into use.
> 
> is there a patch for /etc/rc.d/jail script that make it handles the
> new style jail configuration file format (the C-style format). or am
> I doing this the wrong way.
> 
> If you can point me into the right direction it will be very helpfull.
> 
> Whishlist
> It would be great with something like a /etc/jail.d/<jailname> setup 
> where each jail configuration file is contained in a separate file,
> the format is the same as the /etc/jail.conf, the latter fil just
> holds configurations for all jails. Both files with the C-style
> syntax.

Have you considered using sysutils/ezjail (the de-facto standard for
managing jails under FreeBSD right now) or a similar port
(sysutils/jailrc, sysutils/qjail etc.)?

-- 
Michael Gmelin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131107134432.2530dce7>