Overview

An affinity group expresses placement intent. The common case is anti-affinity: keep these machines on different physical hosts, so losing one host doesn’t lose the whole service.
Navigation: Compute → Affinity Groups. Titled Affinity Groups, subtitled “Control VM placement across hosts”.

Why it matters

Without a group, the platform places machines wherever there’s room — which can mean all three of your web servers land on one host:
Placement is decided when a machine starts. Adding a running machine to a group does not move it — the group takes effect the next time it starts. To apply anti-affinity to machines already running together, stop and start them.

Summary cards

Columns

There’s a search box over name and type, a count, and a section heading All Affinity Groups ({n}).
There is no status column, because affinity groups have no state. A group either exists or it doesn’t.

Row actions

Only one: Delete Group. There is no edit action — a group’s name and type are fixed once created. To change either, create a replacement and move the machines.
Deleting a group asks for confirmation and states what it does and does not affect: machines already placed are not moved, the rule simply stops constraining them.

Creating a group

1

Open the dialog

Create Group, titled Create Affinity Group.
2

Name it

Name is required — no-same-host is the kind of name that reads well later. Pressing Enter submits.
3

Choose a type

Type is populated from the platform. host anti-affinity is the standard option.
4

Describe it (optional)

Description is free text. Worth using — record why the group exists, since the type alone won’t remind you.
Success confirms with “Affinity group created”.
Name the group for its rule rather than its current members: no-same-host stays accurate as machines come and go, where web-servers goes stale the moment you reuse it for something else.

Worked example: a resilient web tier

1

Create the group before the machines

Create Group → name web-no-same-host, type host anti-affinity, description “Keeps the public web tier on separate hosts”.
2

Assign each machine as you create it

Create web-1, web-2, and web-3, putting each in web-no-same-host.
3

Verify the group took effect

The group’s VMs count should read 3. Placement itself is enforced by the platform at start time.
Anti-affinity is bounded by available hosts. If your zone has two hosts and you ask for three anti-affine machines, the third cannot satisfy the rule — the platform will refuse to start it rather than silently co-locate it. Spread across zones for resilience beyond a single zone’s host count.

Empty and error states

Errors surface the platform’s own message.

Virtual Machines

Assign a group while creating a machine.

Regions and zones

Resilience above the host level.