<a id="ref-placement-groups"></a>

# Placement group configuration

Placement groups can be configured through a set of key/value configuration options.
See [How to use placement groups](https://canonical.com/lxd/docs/latest/howto/cluster_placement_groups/index.html.md#cluster-placement-groups) for instructions on how to create and manage placement groups.

The key/value configuration is namespaced.
The following options are available:

- [Placement group options](#placement-group-config)

<a id="placement-group-config"></a>

## Placement group options

Placement groups require two configuration keys to control instance placement behavior across cluster members.

<!-- Include content from [../metadata.txt](../metadata.txt) -->

<a id="placement-group-placement-group:policy"></a>
`policy`

Instance placement policy

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#placement-group-placement-group:policy)

| **Key:**      | `policy`   |
|---------------|------------|
| **Type:**     | string     |
| **Required:** | yes        |

Determines whether instances are spread across cluster members or
compacted onto the same cluster member(s).

Possible values are `spread` and `compact`.
See [Automatic placement of instances](https://canonical.com/lxd/docs/latest/explanation/clusters/index.html.md#clustering-instance-placement) for more information.

<a id="placement-group-placement-group:rigor"></a>
`rigor`

Enforcement level of the placement policy

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#placement-group-placement-group:rigor)

| **Key:**      | `rigor`   |
|---------------|-----------|
| **Type:**     | string    |
| **Required:** | yes       |

Determines whether the policy is strictly enforced or allows fallback.

Possible values are `strict` and `permissive`.
See [Automatic placement of instances](https://canonical.com/lxd/docs/latest/explanation/clusters/index.html.md#clustering-instance-placement) for more information.

<a id="placement-group-placement-group:user.*"></a>
`user.*`

Free form user key/value storage

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#placement-group-placement-group:user.*)

| **Key:**    | `user.*`   |
|-------------|------------|
| **Type:**   | string     |

User keys can be used in search.

## Related topics

How-to guides:

- [Clustering](https://canonical.com/lxd/docs/latest/clustering/index.html.md#clustering)

Explanation:

- [Clusters](https://canonical.com/lxd/docs/latest/explanation/clusters/index.html.md#exp-clusters)
