# Create Server Group

You can configure a server group with an affinity policy and assign the server group to instances that host services that are closely tied together and frequently communicate with one another. When you have all such instances on the same hypervisor host, the communication between the instances is efficient.

You can assign a server group with an anti-affinity policy to virtual machine instances that run applications or services such as SQL server, and cannot afford to have a downtime. When the replicas of the such applications or services are placed on distinct hosts, the anti-affinity policy offers resiliency and the services suffer a negligible downtime.

You must be a self-service user or an administrator to perform this operation.

To create a server group, follow the steps given below.

1\. Log in to Clarity.

2\. Click Instances in the left panel.

3\. Click the Server Groups tab.

4\. Click New Server Group or Add New Server Group.

<figure><img src="/files/F2C984uobMr3a5mmTD5F" alt=""><figcaption></figcaption></figure>

5\. Enter the following details.

| Field  | Description                      |
| ------ | -------------------------------- |
| Name   | The name of the server group     |
| Policy | Select Affinity or Anti-affinity |

6\. Click Create Server Group.

A new server group with the specified policy is created.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform9.com/managed-openstack/5.8/instances/virtual-machines-create-server-groups.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
