Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsmasq fails to start up since it is invoked before vm-bhyve #528

Open
mzaki-jp opened this issue Oct 15, 2023 · 2 comments
Open

dnsmasq fails to start up since it is invoked before vm-bhyve #528

mzaki-jp opened this issue Oct 15, 2023 · 2 comments

Comments

@mzaki-jp
Copy link

mzaki-jp commented Oct 15, 2023

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.

@ierturk
Copy link

ierturk commented Jan 2, 2024

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

@omani
Copy link

omani commented Apr 28, 2024

I had the same issue. fixed it by implementing #435 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants