From owner-freebsd-virtualization@freebsd.org Mon Oct 15 16:14:09 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A2F610B7C98 for ; Mon, 15 Oct 2018 16:14:09 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (cross.sbone.de [195.201.62.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C41E97A5AC for ; Mon, 15 Oct 2018 16:14:08 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 0A1E18D4A213 for ; Mon, 15 Oct 2018 16:14:07 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 198B8D1F855 for ; Mon, 15 Oct 2018 16:14:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 6H4sUuoUkOmb for ; Mon, 15 Oct 2018 16:14:04 +0000 (UTC) Received: from [10.248.98.63] (fresh-ayiya.sbone.de [IPv6:fde9:577b:c1a9:f001::2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 881E5D1F84E for ; Mon, 15 Oct 2018 16:14:04 +0000 (UTC) From: "Bjoern A. Zeeb" To: freebsd-virtualization@freebsd.org Subject: Re: bhyve on reboot loses tap(4) configuration Date: Mon, 15 Oct 2018 16:14:03 +0000 X-Mailer: MailMate (2.0BETAr6123) Message-ID: <683CA96A-EE1A-468E-8041-50721B9215D8@lists.zabbadoz.net> In-Reply-To: References: <02210D52-A45B-4E54-BCEE-EC61026B70C0@lists.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.27 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: Mon, 15 Oct 2018 16:14:09 -0000 On 15 Oct 2018, at 16:10, Marcelo Araujo wrote: > Em ter, 16 de out de 2018 às 00:06, Bjoern A. Zeeb < > bzeeb-lists@lists.zabbadoz.net> escreveu: > >> Hi, >> >> I tried to use bhyve with the tap(4)/vtnet(4) solution as documented >> in >> the handbook (tap needs autoopen). >> However, I am using no bridge(4) interface but a “point-to-point” >> configuration. >> >> Example: >> guest configures vtnet0 to 192.0.2.2/24 >> host configures tap0 to 192.0.2.1/24 >> >> When rebooting the guest inside the bhyve, it seems bhyve loses the >> outside tap0 configuration. I assume that is because the tap0 >> interface >> is closed and re-opened on the “warm restart”. >> >> Apart from using devd and possibly tracking tap interfaces to come up >> and track things there, is there are better solution for not having >> to >> reconfigure the host interface on every guest reboot? >> > > Not sure if I understood well your case, but have you tried to set > this > sysctl: net.link.tap.up_on_open? That only ensures that effectively “an ifconfig tap up” gets issued. The problem, as I assume is, if you close /dev/tap and re-open /dev/tap it seems the configuration (interface addresses) seem to be cleaned up on “close”. /bz