From owner-freebsd-virtualization@FreeBSD.ORG Wed Oct 7 01:37:48 2009 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 550BF106568B for ; Wed, 7 Oct 2009 01:37:48 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outP.internet-mail-service.net (outp.internet-mail-service.net [216.240.47.239]) by mx1.freebsd.org (Postfix) with ESMTP id 3A9D58FC20 for ; Wed, 7 Oct 2009 01:37:48 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 43A26B3EC7; Tue, 6 Oct 2009 18:37:48 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 6E0E72D601E; Tue, 6 Oct 2009 18:37:47 -0700 (PDT) Message-ID: <4ACBF0ED.2070905@elischer.org> Date: Tue, 06 Oct 2009 18:37:49 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: remodeler References: <20091007002615.M76095@alentogroup.org> In-Reply-To: <20091007002615.M76095@alentogroup.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-virtualization@freebsd.org Subject: Re: can't find routing entry for network routes X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 07 Oct 2009 01:37:48 -0000 remodeler wrote: > I am having the same problem as Nikos I am trying to implement a vnet-enabled > service jail on FreeBSD 8.0 HEAD. I have thoroughly studied the "Network stack > virtualization" document written by Marko. I received troubleshooting help > over several days last from Julian Elischer when I raised the issue in this > thread on the freebsd-net list. I am running a GENERIC kernel on amd64, with > the additional options vimage, netgraph, ng_ether, and ng_eiface. please recap with a script that fails i.e. a script I can try run, and show how the output differs from what you would expect. (I don't have your previous emails at hand) > > I successfully applied the patch Bjoern provided: > > http://people.freebsd.org/~bz/20090901-10-vimage-jailed_no_vnet.diff > > I tested with this patch, and also the lines in the other patch Bjoern > provided that are not in HEAD: > > http://people.freebsd.org/~bz/20090906-01-V_llatbl.diff > > i.e., > +#include > + CURVNET_RESTORE(); > + CURVNET_SET_QUIET(TD_TO_VNET(curthread)); > > +vnet_lltable_init(const void *unused __unused) > +{ > + > + /* Manually do what SLIST_HEAD_INITIALIZER would do. */ > + V_lltables.slh_first = NULL; > +} > + > +VNET_SYSINIT(vnet_lltable_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_lltable_init, > + NULL); > > Trying to apply a ruleset after mounting devfs in a jail, I get: > > devfs -m /jail/j/ns/dev rule -s 8 applyset > devfs rule: ioctl DEVFSIO_SAPPLY: No such process > > Attempting to apply a default route to the ngeth0 interface bound to the jail, > I get: > > route: writing to routing socket: Network is unreachable > add net default: gateway 00:23:54:08:2b:f7: Network is unreachable > > netstat -r gives: > > netstat: kvm not available: /dev/mem: Permission denied > Routing tables > rt_tables: symbol not in namelist > > I have /dev/mem mounted in the jail. I've seen reference to mem not being > accessible in the jail, in some of the discussions on running x-server in the > jail. Julian mentioned that it looked like I need to make /dev/mem accessible > in the jail. I do not know how to do that; it also seems that if I had a > routing socket, I could live without reading memory for netstat output. I > understand each jail has its own FIB. I thought jails opened a routing socket > during their creation by default. > > I need to add a default route to use the jail: > > vimage ns route add default -link 00:0a:0b:0c:2b:f7 > > But no combination I've tried succeeds. Any help appreciated :-> > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org"