Re: way for determine VIMAGE feature
On Sun, 9 Jan 2011, Brandon Gooch wrote: On Sun, Jan 9, 2011 at 9:17 AM, Subbsd sub...@gmail.com wrote: Hi is there any mechanism to find out from userland is supports the current kernel VIMAGE or not? something like 'sysctl kern.features.vnet=1' ? Thanks bz@ just committed a feature announcement for VIMAGE: http://svn.freebsd.org/viewvc/base/head/sys/net/vnet.c?r1=217203r2=217202pathrev=217203 # sysctl kern.features.vimage it's been MFCed to stable/8 and will be part of FreeBSD 8.3 (it'll miss 8.2). /bz -- 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___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org
way for determine VIMAGE feature
Hi is there any mechanism to find out from userland is supports the current kernel VIMAGE or not? something like 'sysctl kern.features.vnet=1' ? Thanks ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org
Re: way for determine VIMAGE feature
On Sun, Jan 9, 2011 at 9:17 AM, Subbsd sub...@gmail.com wrote: Hi is there any mechanism to find out from userland is supports the current kernel VIMAGE or not? something like 'sysctl kern.features.vnet=1' ? 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=$(sudo jail -c vnet name=test host.hostname=test path=/) ; if [ $? = 1 ]; then echo VIMAGE NOT AVAILABLE ; exit 1 ; fi' ...or something like that. There may be a better way, or perhaps there should be. -Brandon ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org
Re: way for determine VIMAGE feature
On Sun, 9 Jan 2011, Brandon Gooch wrote: On Sun, Jan 9, 2011 at 9:17 AM, Subbsd sub...@gmail.com wrote: Hi is there any mechanism to find out from userland is supports the current kernel VIMAGE or not? something like 'sysctl kern.features.vnet=1' ? 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=$(sudo jail -c vnet name=test host.hostname=test path=/) ; if [ $? = 1 ]; then echo VIMAGE NOT AVAILABLE ; exit 1 ; fi' I would just go with jail -c vnet command=/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 kern.features.posix_shm: 1 kern.features.ipsec_natt: 1 kern.features.ipsec: 1 /bz -- 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___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org
Re: way for determine VIMAGE feature
On Sun, 9 Jan 2011, Bjoern A. Zeeb wrote: On Sun, 9 Jan 2011, Brandon Gooch wrote: On Sun, Jan 9, 2011 at 9:17 AM, Subbsd sub...@gmail.com wrote: Hi is there any mechanism to find out from userland is supports the current kernel VIMAGE or not? something like 'sysctl kern.features.vnet=1' ? 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=$(sudo jail -c vnet name=test host.hostname=test path=/) ; if [ $? = 1 ]; then echo VIMAGE NOT AVAILABLE ; exit 1 ; fi' I would just go with jail -c vnet command=/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 kern.features.posix_shm: 1 kern.features.ipsec_natt: 1 kern.features.ipsec: 1 Author: bz Date: Sun Jan 9 20:40:21 2011 New Revision: 217203 URL: http://svn.freebsd.org/changeset/base/217203 Log: MfP4 CH=185246 [1]: Add FEATURE() to announce optional VIMAGE. MFC after:3 days [1] for the moment put it in vnet.c. Modified: head/sys/net/vnet.c Modified: head/sys/net/vnet.c == --- head/sys/net/vnet.c Sun Jan 9 17:40:04 2011(r217202) +++ head/sys/net/vnet.c Sun Jan 9 20:40:21 2011(r217203) @@ -80,6 +80,8 @@ __FBSDID($FreeBSD$); * stack instance. */ +FEATURE(vimage, VIMAGE kernel virtualization); + MALLOC_DEFINE(M_VNET, vnet, network stack control block); /* -- 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___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org