A computer-readable storage medium including instructions that are configured, when executed by a computing system, to perform a method for grouping VM objects for networking and security services in a virtualized computing system, the method comprising:
- obtaining VM attributes and identity attributes from a virtual center and an identity server, respectively;
- forming at least one of desired security groups based on security requirements of the virtualized computing system;
- associating a user defined dynamic expression with the at least one of the security groups;
- evaluating the user defined dynamic expression using the obtained VM attributes and identity attributes to determine at least one of expression attributes;
- grouping VM objects based on the determined at least one of the expression attributes;
- and
- associating the grouped VM objects with the created at least one of the security groups.