> For the complete documentation index, see [llms.txt](https://platform9.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform9.com/kb/pcd/storage/shared-storage-requirements-for-vmha.md).

# Shared Storage Requirements for VMHA

## Problem

VMHA evacuation behavior depends on the VM's storage type and the shared storage mounts.

## Background

VMHA can trigger an evacuation when a compute host is:

* Powered off
* Network isolated (management plane can’t reach the host)

Storage configuration affects whether the evacuated VM preserves data. It can also introduce NFS lock conflicts.

## VM storage types

### Ephemeral (local instance disk)

* VM disk data lives under `/opt/data/instances`.
* If `/opt/data/instances` is on shared storage and mounted on every hypervisor host, VM data is preserved during evacuation.
* If `/opt/data/instances` is not shared, evacuation may still succeed, but the instance disk data is lost.

### Volume-backed (boot from volume)

* VM volumes are mounted under a path like `/opt/pf9/data/state/mnt/<id>`.
* VM disk data is not stored under `/opt/data/instances`.
* Whether `/opt/data/instances` is shared does not affect data retention for volume-backed VMs.

## NFS locking (`nolock`) considerations

If your shared storage backend is NFS, mount options can change failover behavior:

* With `nolock`, the evacuated VM will start without NFS lock checks.
* Without `nolock`, the evacuated VM will fail to start if the old VM still holds locks.

{% hint style="warning" %}
`nolock` disables NFS file locking. This can allow two VM processes to write the same files. Use it only if you have fencing in place and the source VM cannot keep writing to the same storage.
{% endhint %}

## Expected VM Evacuation Outcomes

The table below shows the expected VM evacuation status as determined by the VM type (ephemeral or volume-backed), whether `/opt/data/instances` is shared (with or without nolock) for ephemeral VMs, and the host failure type (power loss or network isolation).

| **VM Type**   | **`/opt/data/instances` Mount Status** | **Host Failure Type**                    | **VM Evacuation Status**                                                                                                                                                                     |
| ------------- | -------------------------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ephemeral     | Not shared/mounted                     | Power loss                               | Success, with data loss                                                                                                                                                                      |
| Ephemeral     | Not shared/mounted                     | Network isolation                        | Success, with data loss                                                                                                                                                                      |
| Ephemeral     | Shared and mounted with `nolock`       | Power loss                               | Success, no data loss                                                                                                                                                                        |
| Ephemeral     | Shared and mounted with `nolock`       | Network isolation                        | Success, no data loss. VMs are paused on the source host                                                                                                                                     |
| Ephemeral     | Shared and mounted without `nolock`    | Power loss                               | Success, no data loss                                                                                                                                                                        |
| Ephemeral     | Shared and mounted without `nolock`    | Network isolation                        | <p>Failure with <code>Failed to write lock</code><br></p><p>VM still running on isolated host</p>                                                                                            |
| Volume-backed | Doesn't matter                         | Power loss                               | Success, no data loss                                                                                                                                                                        |
| Volume-backed | Doesn't matter                         | Network isolation (NFS without `nolock`) | <p>Failure with <code>Failed to write lock</code> </p><p></p><p>VM still running on isolated host and continues to hold <code>/opt/pf9/data/state/mnt/\<id>/volume-\<volume-uuid></code></p> |
| Volume-backed | Doesn't matter                         | Network isolation (NFS with `nolock`)    | Success, no data loss. VMs are paused on the source host                                                                                                                                     |


---

# 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 following URL with the `ask` and `goal` query parameters:

```
GET https://platform9.com/kb/pcd/storage/shared-storage-requirements-for-vmha.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

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.
