Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 May 2020 16:38:37 +0200
From:      Evilham <contact@evilham.com>
To:        byrnejb@harte-lyne.ca
Cc:        freebsd-questions@freebsd.org
Subject:   Re: debian in bhyve on freebsd
Message-ID:  <03478242-51fe-49ec-997f-5262c2b97327@yggdrasil.evilham.com>
In-Reply-To: <60e7d910e1eb13643ee3c60080e96766.squirrel@webmail.harte-lyne.ca>
References:  <60e7d910e1eb13643ee3c60080e96766.squirrel@webmail.harte-lyne.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

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: <BROADCAST,MULTICAST,UP,LOWER_UP> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?03478242-51fe-49ec-997f-5262c2b97327>