> For the complete documentation index, see [llms.txt](https://docs.layeronecloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layeronecloud.com/pve-microvm/ha.md).

# High Availability & Migration

Source project: `pve-microvm` (migrated from `docs/ha.md`). Run commands from the code checkout and directory specified below, not from this documentation repository.

## Offline migration <a href="#offline-migration" id="offline-migration"></a>

Microvms support offline migration between nodes on shared storage:

```bash
# VM must be stopped
qm migrate <vmid> <target-node>
```

Tested: z83ii ↔ borg, \~2 seconds on shared CIFS.

## HA support <a href="#ha-support" id="ha-support"></a>

```bash
# VM disks must be on shared storage (CIFS, NFS, etc.)
ha-manager add vm:<vmid> --group Intel --state started

# Relocate (stop → migrate → start)
ha-manager relocate vm:<vmid> <target-node>

# Remove from HA
ha-manager remove vm:<vmid>
```

## Limitations <a href="#limitations" id="limitations"></a>

* **No live migration** — QEMU microvm doesn't implement it
* **HA relocate** performs stop → migrate → start (2–10 s downtime)
* **Shared storage required** — all nodes must see the VM disk

## Tested flow <a href="#tested-flow" id="tested-flow"></a>

| Step                          | Result        |
| ----------------------------- | ------------- |
| Create on z83ii (shared CIFS) | ✅             |
| Offline migrate z83ii → borg  | ✅ (2 seconds) |
| Start on borg                 | ✅             |
| HA add + started              | ✅             |
| HA relocate borg → z83ii      | ✅             |
| VM running after relocate     | ✅             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.layeronecloud.com/pve-microvm/ha.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
