From owner-freebsd-questions@freebsd.org Fri May 22 14:38:43 2020 Return-Path: Delivered-To: freebsd-questions@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 2BB402CA86A for ; Fri, 22 May 2020 14:38:43 +0000 (UTC) (envelope-from contact@evilham.com) Received: from yggdrasil.evilham.com (yggdrasil.evilham.com [46.19.33.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49T8Hk17d2z4NQS for ; Fri, 22 May 2020 14:38:41 +0000 (UTC) (envelope-from contact@evilham.com) Received: from yggdrasil.evilham.com (localhost [IPv6:::1]) by yggdrasil.evilham.com (Postfix) with ESMTP id 49T8Hg3PyGz11kW; Fri, 22 May 2020 16:38:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=evilham.com; h=from:to:cc :subject:references:in-reply-to:date:message-id:mime-version :content-type; s=mail; bh=A8xHCmFnMN/03XPMtwb+hu0SP3c=; b=oh22xm GJTR9JRCTBtJC5RIkLTmN8AaemKB6ucK0Bu2/BLHRhnphczsWj+HVSGjbju2P/kQ AUdaU6FUbkJRULNRDfPVB/2tsCQKZ970WH/34H7N03LmGmBQ1vtkKL6BZd3VWsAF p8SfPXANJfWjTEkFxeF6d4StsSb3SWDYSi8j4= Received: from yggdrasil.evilham.com (unknown [IPv6:2a0a:e5c1:121:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by yggdrasil.evilham.com (Postfix) with ESMTPSA id 49T8Hf6mPjz11kV; Fri, 22 May 2020 16:38:38 +0200 (CEST) From: Evilham To: byrnejb@harte-lyne.ca Cc: freebsd-questions@freebsd.org Subject: Re: debian in bhyve on freebsd References: <60e7d910e1eb13643ee3c60080e96766.squirrel@webmail.harte-lyne.ca> In-reply-to: <60e7d910e1eb13643ee3c60080e96766.squirrel@webmail.harte-lyne.ca> Date: Fri, 22 May 2020 16:38:37 +0200 Message-ID: <03478242-51fe-49ec-997f-5262c2b97327@yggdrasil.evilham.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Rspamd-Queue-Id: 49T8Hk17d2z4NQS X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=fail (headers rsa verify failed) header.d=evilham.com header.s=mail header.b=oh22xm G; dmarc=pass (policy=none) header.from=evilham.com; spf=pass (mx1.freebsd.org: domain of contact@evilham.com designates 46.19.33.155 as permitted sender) smtp.mailfrom=contact@evilham.com X-Spamd-Result: default: False [-3.23 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.01)[-1.006]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_REJECT(0.00)[evilham.com:s=mail]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-0.97)[-0.972]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[evilham.com:-]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(0.00)[evilham.com,none]; NEURAL_HAM_SHORT(-0.45)[-0.451]; DMARC_POLICY_ALLOW_WITH_FAILURES(-0.50)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:196752, ipnet:46.19.32.0/21, country:NL] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2020 14:38:43 -0000 On dv., maig 22 2020, James B. Byrne via freebsd-questions wrote: > debian-10.4.0-amd64 > FreeBSD-12.1-RELEASE-p5-amd64 > vm-bhyve-1.4.2 > > This is so tedious. Ok, I need to test rsync on Debian in > relation to another > problem. I have created a bhyve vm for this OS, an OS I have > never before > used, and find that the networking does not, work. > > On the debian byhyve console I see this: > ip a show > . . . > 2: enp0s5: mtu 1500 qdisc > pfifo_fast state UP > group default qlen 1000 > link/ether 58:9c:fc:06:84:ab brd ff:ff:ff:ff:ff:ff > inet 192.168.8.165/24 brd 192.168.8.255 scope global enp0s5 > valid_lft forever preferred_lft forever > inet6 fe80::5a9c:fcff:fe06:84ab/64 scope link > valid_lft forever preferred_lft forever > > I do not recognize the i/f name enp0s5. I expected something > like vtnet0 > instead. I am sure that this has something to do with systemd > but whatever the > cause I cannot get this vm to talk to the network. > > The config for this vm is: > > loader="grub" > cpu=4 > memory=8G > network0_type="virtio-net" > network0_switch="public" > disk0_type="ahci-hd" > disk0_name="disk0.img" > grub_run_partition="1" > grub_run_dir="/boot/grub" > uuid="79d40e25-9b67-11ea-aba7-7085c2da884f" > network0_mac="58:9c:fc:06:84:ab" > > What should the virtual interface be called? How do I get this > set properly? > Is this a byhyve problem? A debian problem? There are several questions you are raising here. A few are Debian-specific: - Interface names: https://wiki.debian.org/NetworkInterfaceNames TL;DR: You have "new" names (default), like the one you are seeing and "old" names like "eth0". Since you are using `loader="grub"`, you may be able to set net.ifnames=0 to get the "old" naming scheme back. man 8 vm has pointers to that. - Networking: AFAIK bhyve itself and vm-bhyve don't take care of networking but instead make everything, so you have the OS tools to set that up. In your case it looks like DHCP is working (the interface has an IPv4), make sure your firewall (in the host and in the guest) isn't standing in the way and that basic networking works (ping / netcat/telnet...) Depending on your setup you may need to setup ip forwarding in the host. - Finally, make sure the guest system is exposing rsync / rsync over ssh properly. All in all, one of the things I've been liking about bhyve (and vm-bhyve) is that you don't have to re-learn networking, it just uses the same things a regular network does and uses the same tools. Good luck, hope that helps. -- Evilham