> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ibee.ai/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ibee.ai/docs/_mcp/server.

# Attach VMs

> Point an IBEE Solutions load balancer at your Cloud VMs or GPU VMs by adding them as IP or hostname backends.

A load balancer routes to **backends** — each one a `service`, `ip`, or `hostname` target. To balance traffic across your virtual machines, add each VM as a backend using its IP address.

## Before you begin

* Two or more running VMs in the same workspace serving the same application ([Create a VM](/docs/infrastructure/cloud-vms/create-a-vm))
* The application listening on the same port on every VM
* A health endpoint on each VM (e.g. `/health`) so failed instances are removed automatically

## Add VMs as backends

### Collect the VM addresses

Open each VM's detail page and note its IP address. Prefer private IPs when the VMs and load balancer share a network — traffic stays internal.

### Add a backend row per VM

In the load balancer create form (or when recreating with updated backends), add one row per VM:

| Field      | Value                                               |
| ---------- | --------------------------------------------------- |
| **Type**   | `ip` — or `hostname` if you address VMs by DNS name |
| **Target** | The VM's IP address, e.g. `10.8.0.12`               |
| **Port**   | The port your application listens on                |
| **Weight** | `100` for an equal split — adjust to shift traffic  |
| **TLS**    | Enable only if the VM serves TLS on that port       |

### Verify distribution

After creation, open the detail page — the **Backends** table lists every VM with its type, target, port, weight, and TLS setting. Send a few requests to the endpoint URL and confirm they spread across VMs (watch your application logs, or include the hostname in a test response).

## Scaling the pool

To add or remove VMs from rotation, update the backend list. Unhealthy VMs are removed from rotation automatically by [health checks](/docs/network-security/load-balancer/health-checks) — you don't need to remove a VM that's temporarily down.

> **Info**
>
> To drain a VM before maintenance without removing it, lower its weight so new traffic prefers the other backends.

## Related pages

* [Create a load balancer](/docs/network-security/load-balancer/create-a-load-balancer)
* [Health checks](/docs/network-security/load-balancer/health-checks)
* [Networking for VMs](/docs/infrastructure/cloud-vms/networking-for-vms)