vm-bhyve
vm-bhyve copied to clipboard
dnsmasq failed to start : unknown interface vm-public
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.
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?
Same problem here
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"