cant ping across trunk

I have three ports connected to a vmware server as a trunk port. I have a vm inside and I am unable to ping it on the same vlan.
port 1-3 is for vmware port 6 is on vlan 21 and there is vm inside the vmware server also in vlan 21 and I cant ping across.

/interface bridge
add l2mtu=1598 name=bridge-native
add l2mtu=1598 name=bridge-public
add l2mtu=1598 name=bridge-trunk
/interface vlan
add interface=bridge-native l2mtu=1594 name=vlan-21-native vlan-id=21
add interface=bridge-public l2mtu=1594 name=vlan-50-public vlan-id=50
add interface=bridge-trunk l2mtu=1594 name=vlan-21-trunk vlan-id=21
add interface=bridge-trunk l2mtu=1594 name=vlan-50-trunk vlan-id=50
/interface bridge port
add bridge=bridge-native interface=ether6
add bridge=bridge-public interface=ether7
add bridge=bridge-public interface=ether8
add bridge=bridge-native interface=ether9
add bridge=bridge-native interface=ether10
add bridge=bridge-trunk interface=ether1
add bridge=bridge-trunk interface=ether2
add bridge=bridge-trunk interface=ether3
add bridge=bridge-trunk interface=ether4
add bridge=bridge-trunk interface=ether5
/ip address
add address=192.168.21.1/24 interface=bridge-native
add address=192.168.50.1/24 interface=bridge-public
/ip dns
set allow-remote-requests=yes

I would create this diffenrently
Create VLAN interfaces on the ether interfaces that needs to act as trunk
And put these VLAN interfaces into designated bridges
/interface vlan
add interface=ether1 l2mtu=1594 name=vlan-21-e1 vlan-id=21
add interface=ether1 l2mtu=1594 name=vlan-50-e1 vlan-id=50
add interface=ether2 l2mtu=1594 name=vlan-21-e2 vlan-id=21
add interface=ether2 l2mtu=1594 name=vlan-50-e2 vlan-id=50
add interface=ether3 l2mtu=1594 name=vlan-21-e3 vlan-id=21
add interface=ether3 l2mtu=1594 name=vlan-50-e3 vlan-id=50
add interface=ether4 l2mtu=1594 name=vlan-21-e4 vlan-id=21
add interface=ether4 l2mtu=1594 name=vlan-50-e4 vlan-id=50
add interface=ether5 l2mtu=1594 name=vlan-21-e5 vlan-id=21
add interface=ether5 l2mtu=1594 name=vlan-50-e5 vlan-id=50

/interface bridge
add l2mtu=1598 name=bridge-native
add l2mtu=1598 name=bridge-public

/interface bridge port
add bridge=bridge-native interface=ether6
add bridge=bridge-native interface=ether9
add bridge=bridge-native interface=ether10
add bridge=bridge-native interface=vlan-21-e1
add bridge=bridge-native interface=vlan-21-e2
add bridge=bridge-native interface=vlan-21-e3
add bridge=bridge-native interface=vlan-21-e4
add bridge=bridge-native interface=vlan-21-e5

add bridge=bridge-public interface=ether7
add bridge=bridge-public interface=ether8
add bridge=bridge-public interface=vlan-50-e1
add bridge=bridge-public interface=vlan-50-e2
add bridge=bridge-public interface=vlan-50-e3
add bridge=bridge-public interface=vlan-50-e4
add bridge=bridge-public interface=vlan-50-e5

/ip address
add address=192.168.21.1/24 interface=bridge-native
add address=192.168.50.1/24 interface=bridge-public

/ip dns
set allow-remote-requests=yesAnother important thing his how your virtual network is configured

Is there a better way of doing this cause this seems like the more vlans I add this config will grow exponentially. In cisco if I allow all vlans on the trunk then it is just one line of code on the interface.
Also, what is wrong with my config, why cant I ping from vlan 21 on port 9 to a vm also on vlan 21. The VM is inside the vm host which is connect to ports 1-3 as a trunk.

I looked closer to your config.
It might help adding the vlan interfaces vlan-21-native and vlan-51-public to the designated bridges

Thinking again. You do not need the native and public vlan interfaces and put the vlan interfaces from the trunk bridge to the individual bridges

not sure if I understand what you mean

so remove

/interface vlan
add interface=bridge-trunk l2mtu=1594 name=vlan-21-trunk vlan-id=21
add interface=bridge-trunk l2mtu=1594 name=vlan-50-trunk vlan-id=50

but then what do you mean add the vlan interface to individual trunks?

No. Remove the other two VLAN interfaces.
Then add the interfaces you mentioned into the bridge-native and bridge-public