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: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.
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.
Related
Virtual Machines
Assign a group while creating a machine.
Regions and zones
Resilience above the host level.