From owner-freebsd-virtualization@freebsd.org Tue Nov 5 16:43:32 2019 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1208F1ACBDA for ; Tue, 5 Nov 2019 16:43:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 476wTb6npyz3DZR for ; Tue, 5 Nov 2019 16:43:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id E920B1ACBD9; Tue, 5 Nov 2019 16:43:31 +0000 (UTC) Delivered-To: virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8E301ACBD8 for ; Tue, 5 Nov 2019 16:43:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 476wTb5sCHz3DZQ for ; Tue, 5 Nov 2019 16:43:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE04AFA83 for ; Tue, 5 Nov 2019 16:43:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id xA5GhV7f016372 for ; Tue, 5 Nov 2019 16:43:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id xA5GhVIv016369 for virtualization@FreeBSD.org; Tue, 5 Nov 2019 16:43:31 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 241737] [patch] cannot use the tap interface name to build a VM Date: Tue, 05 Nov 2019 16:43:31 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: 12.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: fabien.costard@free.fr X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 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: Tue, 05 Nov 2019 16:43:32 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241737 Bug ID: 241737 Summary: [patch] cannot use the tap interface name to build a VM Product: Base System Version: 12.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bhyve Assignee: virtualization@FreeBSD.org Reporter: fabien.costard@free.fr Created attachment 208881 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D208881&action= =3Dedit modification on pci_virtio_net.c Hi, If a tap interface is created with a name, it is not possible to start a VM with bhyve using this name. We must use the device name. For example, I create this interface (sysctl is correctly configured to use tap): ifconfig tap create name port1 when I launch the VM (after loaded it for sure) bhyve -c 1 -m 256 -A -H -P -s 0:0,hostbridge -s 1,virtio-net,port1 -s 2:0 virtio-blk,/root/rFreeBSD.img -s 31,lpc -l com1,/dev/nmdm0A rFreeBSD The network will not work because the command is only develop to check devi= ce in /dev/. I add some code to check if the name matches with a interface and replace i= t to create the virtual interface I hope I was enough clear and my code not too ugly --=20 You are receiving this mail because: You are the assignee for the bug.=