From owner-freebsd-virtualization@FreeBSD.ORG Thu Nov 7 12:49:58 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8BD47DD1 for ; Thu, 7 Nov 2013 12:49:58 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id E8BBD2C5A for ; Thu, 7 Nov 2013 12:49:57 +0000 (UTC) Received: (qmail 21485 invoked by uid 89); 7 Nov 2013 12:49:56 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@88.217.181.77) by mail.grem.de with ESMTPA; 7 Nov 2013 12:49:56 -0000 Date: Thu, 7 Nov 2013 13:49:55 +0100 From: Michael Gmelin To: Kristen Nielsen Subject: Re: FreeBSD 9.1-Rel: Jail-rc startup of vnet jails with new configuration syntax Message-ID: <20131107134955.734a474f@bsd64.grem.de> In-Reply-To: <20131107134432.2530dce7@bsd64.grem.de> References: <527B86E2.5020907@krn.dk> <20131107134432.2530dce7@bsd64.grem.de> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.18; amd64-portbld-freebsd9.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 12:49:58 -0000 On Thu, 7 Nov 2013 13:44:32 +0100 Michael Gmelin wrote: > > > On Thu, 07 Nov 2013 13:26:10 +0100 > Kristen Nielsen 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__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/ > > 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.)? > I missed the vnet requirement in my first reply. There has been a vnet patch for ezjail floating around a while ago, but I think it was never adopted to ezjail. Sorry for the noise. -- Michael Gmelin