vm-bhyve
vm-bhyve copied to clipboard
dnsmasq fails to start up since it is invoked before vm-bhyve
when combined with vm-bhyve, dnsmasq fails to start up when booting from /etc/rc. dmesg shows:
dnsmasq[1732]: failed to create listening socket for 192.168.x.x: Can't assign requested address
This is because rcorder(8) arranges dnsmasq before vm.
In the system's rc.d scripts, "ipfw" and "pf" are required by "netwait", and then by "NETWORKING"; however, vm-bhyve's rc.d script contradicts them since it requires "NETWORKING" before "dnsmasq ipfw pf". I guess this leads to the omission of "vm before dnsmasq"
If I remove the directive requiring "SERVERS" from vm-bhyve's rc.d script, rcorder(8) arranges vm before dnsmasq, and dnsmasq successfully starts up. (although removing "NETWORKING" still fails. only removing "SERVERS" works well. I can't say why.)
So please consider modifying the rc.d script directive. Thanks in advance.
It seems that the interface is being created as bridge0
, then renamed as vm-public
after the dnsmasq service
is being tried to start
Jan 2 11:12:56 mac-bsd dnsmasq[1583]: unknown interface vm-public
Jan 2 11:12:56 mac-bsd dnsmasq[1583]: FAILED to start up
Jan 2 11:12:56 mac-bsd root[1587]: /etc/rc: WARNING: failed to start dnsmasq
Jan 2 11:12:56 mac-bsd kernel: .
Jan 2 11:12:56 mac-bsd kernel: bridge0: Ethernet address: 58:9c:fc:10:ff:a4
Jan 2 11:12:56 mac-bsd kernel: bridge0: changing name to 'vm-public'
Jan 2 11:12:57 mac-bsd kernel: bastille0: link state changed to UP
I had the same issue. fixed it by implementing https://github.com/churchers/vm-bhyve/issues/435#issuecomment-1353550627