vm-bhyve icon indicating copy to clipboard operation
vm-bhyve copied to clipboard

dnsmasq failed to start : unknown interface vm-public

Open amutu opened this issue 6 years ago • 3 comments

service dnsmasq onestart Starting dnsmasq.

dnsmasq: unknown interface vm-public /usr/local/etc/rc.d/dnsmasq: WARNING: failed to start dnsmasq

I think it is not a good idea to add vm- prefix or change the bridge name, It make the config and command inconsistent.

I just update vm-bhyve and find all the network stop work for my vms.

amutu avatar Oct 15 '18 05:10 amutu

I find the problem. My vm-public switch did not assign an ip addr and this make dnsmasq unhappy. I rember this is not a problem when the old bridge0 name?

amutu avatar Oct 15 '18 06:10 amutu

Same problem here

grembo avatar Oct 21 '18 12:10 grembo

The reason was that NAT handling was removed (I missed that as well and was stuck after an update). Also, due to renaming interfaces, special rules I had in pf.conf didn't match anymore.

What I did to solve it:

  • change interface in dnsmasq.conf to vm-public
  • Added addr_public="172.16.0.1/24" to /vms/.config/system.conf
  • Manually enabled packet forwarding (sysctl net.inet.ip.forwarding=1), do s_ysrc gateway_enable=YES_ to make it permanent
  • Added natting bits to /etc/pf.conf manually
  • Renamed bridge0 to vm-public in /etc/pf.conf

The cleanest way is probably to remove system.conf and recreate the switch (using -a to set an addr and -i to set the interface). My system.conf looks like this now:

switch_list="public"
type_public="standard"
ports_public="wlan0"
addr_public="172.16.0.1/24"

grembo avatar Oct 21 '18 14:10 grembo