debian in bhyve on freebsd
Evilham
contact at evilham.com
Fri May 22 14:38:43 UTC 2020
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
More information about the freebsd-questions
mailing list