- With the help of the OpenStack CLI you need to create a server group. In this example we want to use the Policy Anti-Affinity in order to make sure that VMs are NOT placed on the same hardware. In order to do this, please use this command:
openstack server group create Group01 --policy anti-affinity - You should receive the following output:
+----------+--------------------------------------+
| Field | Value |
+----------+--------------------------------------+
| id | a0bb8ea7-3348-42c7-a3da-e9593a8d7821 |
| members | |
| name | Group01 |
| policies | anti-affinity |
+----------+--------------------------------------+
If you create additionel instances (VMs) with this server group, OpenStack wil make sure that instances in this grip will not be on the same physical hardware.
You can also create server groups with a Policy Affinity (--policy affinity), in order to group instances (VMs) on the same hardware.