KVM Guest All Multicast

shimian5

Dabbler
Joined
Dec 16, 2014
Messages
43
Hello!

I just yesterday converted my nested TrueNAS Core/ESXi box to TrueNAS Scale. I had one configuration that I had to continue using as a VM (Home Assistant), but noticed an issue with HomeKit. I tracked this issue down to a UDP Multicast issue and something on the network side.

After doing some digging I found that this command resolves the issue 'ip link set dev macvtap4 allmulticast on'

My assumption though, is that this link will get deleted and recreated either when the host reboots of the guest reboots.

Is there a way to permanently set this flag for this particular VM?
 

waqarahmed

iXsystems
iXsystems
Joined
Aug 28, 2019
Messages
136
@mbaran there is not right now. We have a ticket where user can specify custom options for an interface ( https://jira.ixsystems.com/browse/NAS-112119 ) and when the change is in, you can do that for a bridge perhaps and use that with your VM ? If that does not suit your usecase, can you please create a suggestion ticket at https://jira.ixsystems.com outlining why this is explicitly required for your VM macvtap interface and we can tackle it then once we have the votes. Thanks!
 

Ixian

Patron
Joined
May 11, 2015
Messages
218
In the meantime a simple bash script to run that command configured as a post-init script (System Settings>Advanced>Init/Shutdown scripts) would also do the job.
 

shimian5

Dabbler
Joined
Dec 16, 2014
Messages
43
In the meantime a simple bash script to run that command configured as a post-init script (System Settings>Advanced>Init/Shutdown scripts) would also do the job.

So the interface name changes each time, as the macvlan is created on boot/destroyed on shutdown. Should I be using a static bridge instead to avoid the auto creation/deletion?
 

Ixian

Patron
Joined
May 11, 2015
Messages
218
Hard to say without more info but on a side note I use a bridge already so my VMs can communicate with the host (for NFS shares, etc.). Try it.
 

shimian5

Dabbler
Joined
Dec 16, 2014
Messages
43
Just realized I can't do this, as I created a vlan using my eno1 as it's parent. Bridge creation tells me now that eno1 is in use by a vlan so it can't be the parent. I might need to add a 2nd interface instead of a vlan.
 

Ixian

Patron
Joined
May 11, 2015
Messages
218
Just realized I can't do this, as I created a vlan using my eno1 as it's parent. Bridge creation tells me now that eno1 is in use by a vlan so it can't be the parent. I might need to add a 2nd interface instead of a vlan.

You can't add your vlan interface to the bridge as well?
 

shimian5

Dabbler
Joined
Dec 16, 2014
Messages
43
You can't add your vlan interface to the bridge as well?

I finally figured this out, thank you.

I had to remove my vlan, then remove the IP from eno1 first, then create a bridge, test/apply the settings, and finally recreate my vlan.

now I can just apply the multicast settings to the bridge on boot.

thanks!
 

shimian5

Dabbler
Joined
Dec 16, 2014
Messages
43
Had exactly the same problem. What kind of the script you are running?

I haven't rebooted yet... I should really address this though so I don't get burned next time I do. I will see if I can fiddle with a startup script and post the contents here tonight.
 

shimian5

Dabbler
Joined
Dec 16, 2014
Messages
43
It's a bit tricky. You have to be sure to remove the primary IP from the main NIC before creating the bond with the NIC in it. Also, don't apply the settings until you have everything queued up. It took me a few tries to get it right.
 

mye

Dabbler
Joined
Oct 1, 2021
Messages
13
I think I have fixed the multicast without init script.

-syncpeer added to the bridge option filed. I can add the HA homekit bridge to the apple homekit....

But no docker/kubernetis multicast still, I was trying it with truecharts instance of HA. I wonder if I need to pach the port to nodeport... not sure how truenas kubernetes is mare, but on "normal" kubernetes ports from 30000 available or you need to make an ingress.
 

fdzaebel

Cadet
Joined
Jan 4, 2022
Messages
4
Hello,

I am using SCALE since one week now and also discovered the problem that the guest OS in my virtual machine is not able to receive multicast packages. Right now I have attached the VM to the physical LAN interface (and not the macvtap or any bridge).

So, as you guys seem to solved this problem. Could you please tell me, how you did this?

Thanks a lot!
 
Top