# Image Library High Availability

You can create a highly available deployment of <code class="expression">space.vars.product\_name</code> Image Library Service in a region by enabling image library role on multiple hosts. This feature requires the use of shared storage backend for Image Library storage. Once configured, this feature enables seamless access to images across host failures or maintenance events for hosts assigned with image library role.

## Prerequisites

Following are the pre-requisites for enabling high availability for Image Library Service:

* A shared storage backend (e.g., NFS, or other block storage volume backend) is available and accessible by all hosts that will be assigned the image library role.
* All hosts that will be assigned the image library role must be located in the same region. <code class="expression">space.vars.product\_name</code> does not support cross region image library deployment today.
* Networking and firewall rules allow image-related traffic between image library hosts and all other hosts configured with rest of the <code class="expression">space.vars.product\_name</code> services.

## Supported Storage Backends

Following table describes the supported and unsupported backends for configuring high availability for image library service.

| **Backend Type**       | **HA Support**                                                |
| ---------------------- | ------------------------------------------------------------- |
| File-based (e.g., NFS) | Must be mounted on all Image Library hosts with the same path |
| Block Storage Volume   | Recommended for scalable and resilient storage                |
| Local File System      | Not supported for HA; images will be isolated per host        |

## How HA Works in Image Library

* When images are stored on shared storage, any image library host can serve them for VM or volume creation.
* During image creation, <code class="expression">space.vars.product\_name</code> dynamically selects an available and healthy image library host. If one host is offline, the system transparently retries with another active host to create the image, ensuring uninterrupted service.

## Deployment Steps

### Step 1: Configure Shared Storage

Ensure that your shared storage (e.g., NFS or block storage) is correctly mounted or attached on each host where the image library role will be enabled.

{% tabs %}
{% tab title="Bash" %}

```bash
mount -t nfs <nfs-server>:/<exported-path> /var/lib/glance/images
```

{% endtab %}
{% endtabs %}

Configure the image library for block storage to use the volume backend in glance.conf , usually located at `/etc/glance/glance.conf`. This tells Glance to use Cinder to save and retrieve images.

{% tabs %}
{% tab title="YAML" %}

```yaml
[glance_store]
stores = cinder
default_store = cinder
```

{% endtab %}
{% endtabs %}

### Step 2: Enable Image Library Role on Multiple Hosts

1. Navigate to Infrastructure > Hosts in the <code class="expression">space.vars.product\_name</code> UI.
2. Select the target host.
3. Click Edit Roles and assign the Image Library role.
4. Repeat this for all hosts that should serve as HA endpoints.

{% hint style="info" %}
**Info**

Ensure each host has proper access to the shared image storage path.
{% endhint %}

### Step 3: Validate that image library service is running

Run the following on each host enabled with image library role:

{% tabs %}
{% tab title="Bash" %}

```bash
systemctl status airctl-glance
```

{% endtab %}
{% endtabs %}

Check that:

* The airctl-glance service is active.
* No errors are reported in `/var/log/airctl/glance.log`.

You can also validate from the <code class="expression">space.vars.product\_name</code> UI by checking the Settings > API Access > API Endpoints and check that `image-cluster` service is available with multiple Image Library endpoint.


---

# Agent Instructions: 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:

```
GET https://docs.platform9.com/private-cloud-director/2025.4/virtualized-clusters/image-library---images/image-library-high-availability.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
