You create a security group at the NSX Manager level.


If you are creating a security group based on Active Directory group objects, ensure that one or more domains have been registered with NSX Manager. NSX Manager gets group and user information as well as the relationship between them from each domain that it is registered with. See Register a Windows Domain with NSX Manager.


  1. Log in to the vSphere Web Client.
  2. Click Networking & Security and then under Networking & Security Inventory click NSX Managers.
  3. Click an NSX Manager in the Name column and then click the Manage tab.
    • You must select the primary NSX Manager if you need to manage universal security groups.

  4. Click the Grouping Objects tab, click Security Group, then click the Add Security Group icon.
  5. Type a name and optionally a description for the security group.
  6. (Optional) If you need to create a universal security group, select Mark this object for universal synchronization.
  7. Click Next.
  8. On the Dynamic Membership page, define the criteria that an object must meet for it to be added to the security group you are creating. This gives you the ability to include virtual machines by defining a filter criteria with a number of parameters supported to match the search criteria.

    If you are creating a universal security group, the Define dynamic membership step is not available.

    For example, you may include a criterion to add all virtual machines tagged with the specified security tag (such as AntiVirus.virusFound) to the security group. Security tags are case sensitive.

    Or you can add all virtual machines containing the name W2008 and virtual machines that are in the logical switch global_wire to the security group.


  9. Click Next.
  10. On the Select objects to include page, select the tab for the resource you want to add and select one or more resources to add to the security group. You can include the following objects in a security group.
    Table 1. Objects that can be included in security groups and universal security groups.

    Security Group

    Universal Security Group

    • Other security groups to nest within the security group you are creating.

    • Cluster

    • Logical Switch

    • Network

    • Virtual App

    • Datacenter

    • IP sets

    • Directory Groups


      The Active Directory configuration for NSX security groups is different from the AD configuration for vSphere SSO. NSX AD group configuration is for end users accessing guest virtual machines, while vSphere SSO is for administrators using vSphere and NSX. In order to consume these directory groups you must sync with Active Directory. See Identity Firewall Overview.

    • MAC Sets

    • Security tag

    • vNIC

    • Virtual Machine

    • Resource Pool

    • Distributed Virtual Port Group

    • Other universal security groups to nest within the universal security group you are creating.

    • Universal IP sets

    • Universal MAC sets

    The objects selected here are always included in the security group regardless of whether or not they match the criteria in Step 8.

    When you add a resource to a security group, all associated resources are automatically added. For example, when you select a virtual machine, the associated vNIC is automatically added to the security group.

  11. Click Next and select the objects that you want to exclude from the security group.

    If you are creating a universal security group, the Select objects to exclude step is not available.

    The objects selected here are always excluded from the security group regardless of whether or not they match the dynamic criteria.

  12. Click Finish.


Membership of a security group is determined as follows:

{Expression result (derived from step 8) + Inclusions (specified in step 10} - Exclusion (specified in step 11)

This means that inclusion items are first added to the expression result. Exclusion items are then subtracted from the combined result.