Date: Sun, 9 Jan 2011 17:20:26 +0000 (UTC) From: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> To: Brandon Gooch <jamesbrandongooch@gmail.com> Cc: FreeBSD virtualization mailing list <freebsd-virtualization@freebsd.org> Subject: Re: way for determine VIMAGE feature Message-ID: <20110109171351.I14966@maildrop.int.zabbadoz.net> In-Reply-To: <AANLkTimnJhTj%2BVqqz0H1FdgLuMO6cd7svq=VBsit_YcR@mail.gmail.com> References: <AANLkTi=wSg%2BjNcV0QQs1_GJ1B3bEe7McLggO1bMshvpz@mail.gmail.com> <AANLkTimnJhTj%2BVqqz0H1FdgLuMO6cd7svq=VBsit_YcR@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1515049787-1294593626=:14966 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sun, 9 Jan 2011, Brandon Gooch wrote: > On Sun, Jan 9, 2011 at 9:17 AM, Subbsd <subbsd@gmail.com> wrote: >> Hi >> >> is there any mechanism to find out from userland =A0is supports the >> current kernel VIMAGE or not? something like 'sysctl >> kern.features.vnet=3D1' ? >> Thanks > > I've not been able to determine this either, but as it requires kernel > re-configuration, I usually just know. In my scripts, I make sure and > fail if the call to create a vnet jail fails: > > sh -c 'TEST=3D$(sudo jail -c vnet name=3Dtest host.hostname=3Dtest path= =3D/) ; > if [ $? =3D "1" ]; then echo "VIMAGE NOT AVAILABLE" ; exit 1 ; fi' I would just go with jail -c vnet command=3D/usr/bin/true or something along these liens for the pure test. Otherwise you might end up with a running jail, that you may not want unless you test it with the complete command line. > ...or something like that. > > There may be a better way, or perhaps there should be. Or there will be if there isn't yet. I remember I added a FEATURE() macro somehere. At least my dev machine already has it... # sysctl -a kern.features kern.features.compat_freebsd7: 1 kern.features.compat_freebsd6: 1 kern.features.compat_freebsd5: 1 kern.features.compat_freebsd4: 1 kern.features.vimage: 1=09=09=09<<< kern.features.posix_shm: 1 kern.features.ipsec_natt: 1 kern.features.ipsec: 1 /bz --=20 Bjoern A. Zeeb You have to have visions! <ks> Going to jail sucks -- <bz> All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html --0-1515049787-1294593626=:14966--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110109171351.I14966>