you mean I have to configure vlans on MX and also in Switch?
Yes, the Aruba needs to have the VLAN configured to be able to pass traffic on that VLAN. It doesn't need a VLAN gateway/Virtual Interface though as this will be on the MX.
What i have done: Configure 2 Vlans in MX.
port 1 of MX is connected to Port 24 on Aruba switch (on MX Native vlan 1 and allowed vlans all)
Now on Aruba SW i have configured same 2 vlan. Port 24 is tagged.
When you say Port 24 is tagged, do you mean it's allowing tagged traffic or tagging incoming traffic?
Mind you, some of this configuration is dependent on what you're trying to achieve as the end goal. The above assumes that the Aruba will be tagging traffic downstream, and sending tagged traffic to the upstream MX where the VLAN gateway resides.