From owner-freebsd-virtualization@freebsd.org Sat Dec 30 16:08:00 2017 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C032E9F93B for ; Sat, 30 Dec 2017 16:08:00 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B10481979 for ; Sat, 30 Dec 2017 16:07:59 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (mh0.gentlemail.de [IPv6:2a00:e10:2800::a135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id vBUG7ufk090172; Sat, 30 Dec 2017 17:07:56 +0100 (CET) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 77D6C438; Sat, 30 Dec 2017 17:07:56 +0100 (CET) Message-ID: <5A47B9DC.4070503@omnilan.de> Date: Sat, 30 Dec 2017 17:07:56 +0100 From: Harry Schmalzbauer Organization: OmniLAN User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.9.2.8) Gecko/20100906 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Shawn Webb CC: freebsd-virtualization@freebsd.org Subject: Re: Unable to use renamed tap device References: <20171230061053.ui4wc4yqw7szsbuw@mutt-hbsd> In-Reply-To: <20171230061053.ui4wc4yqw7szsbuw@mutt-hbsd> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]); Sat, 30 Dec 2017 17:07:56 +0100 (CET) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: ; Sender-helo: mh0.gentlemail.de; ) X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.25 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: Sat, 30 Dec 2017 16:08:00 -0000 Bezüglich Shawn Webb's Nachricht vom 30.12.2017 07:10 (localtime): > Hey All, > > I'm in the process of reorganizing my bhyve setup on my development > laptop. I'd like to have rename the tap devices to match the name of > the VM so that it's easier to keep track of. Otherwise, I have to keep > a spreadsheet of (tap3 -> win10-vm, tap4 -> fbsd-vm). > > It appears bhyve doesn't attach renamed tap devices. Here's the steps > I used: > > ifconfig bridge0 create > ifconfig tap0 create name fbsd-01 > ifconfig bridge0 addm em0 addm fbsd-01 up > sh /usr/share/examples/bhyve/vmrun.sh -t fbsd-01 [normal vmrun.sh arguments here] > > (In this example, em0 is the physical network device connected to the > LAN. I want to share em0 with the host and the guest via the bridge.) > > The net.link.tap.up_on_open sysctl node is set to 1. Normally, when > bhyve starts up (with tap0 instead of fbsd-01), it opens the tap > device and UPs it. I'm not seeing that same behavior with a renamed > tap interface: > > $ ifconfig ld-03_01 > ld-03_01: flags=8903 metric 0 mtu 1500 > options=80000 > ether 00:bd:df:e9:f6:04 > groups: tap > media: Ethernet autoselect > status: no carrier > nd6 options=29 > > So, it seems to me that bhyve doesn't like it when tap devices are > renamed. Can anyone shed some light on this? Unfortunately not too much, besides this report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219746 As long as the control device name isn't also renamed, tap/vmnet renaming should be blocked in rc(8), since it can't work the way it is at the moment. Unfortunately my C skills don't allow me to check if renaming the control device could/should be implemented in whatever functions are responsible for IF renaming (meaning to make it a kernel task). Or if it would be better to utilize devd(8)!? -harry