> For the complete documentation index, see [llms.txt](https://docs.platform9.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.platform9.com/private-cloud-director/images-and-image-library/restrict-image-library-to-cluster.md).

# Restrict the Image Library Service to a Specific Cluster

## Overview

By default, the Image Library Service operates at the region level: the Compute Service and the Persistent Storage Service round robin across all Image Library hosts in the region to fetch an image. In a multi-cluster deployment, you may want the hosts in a cluster to use only that cluster's Image Library host, for isolation and better performance. <code class="expression">space.vars.product\_name</code> does not expose a blueprint-level setting for this, so you restrict it with a per-host configuration override.

In this guide, you will apply a configuration override on the compute and persistent storage hosts in a cluster so that they fetch images only from that cluster's Image Library host.

{% hint style="danger" %}
**Important**

This is an advanced operation that should only be performed by Administrators, ideally under guidance from the Platform9 support or solution architect teams.
{% endhint %}

## Before You Begin

* Apply the override on every compute host and every persistent storage host in the target cluster. If you miss a host, it continues to fetch images from any Image Library host in the region.
* Changes persist across upgrades and require a service restart to take effect.
* Identify the cluster-local Image Library endpoint first, in the form `https://<image-library-host>:9494`. Use `https://localhost:9494` only when the host you are editing also has the Image Library role assigned.

## Apply the Override

On each compute host and each persistent storage host in the cluster, add the following block to the service's override file:

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

```bash
[glance]
endpoint_override = https://localhost:9494

[pf9_glance]
glance_cluster = false
```

{% endtab %}
{% endtabs %}

* `endpoint_override` sets the single Image Library endpoint this host uses. Replace `https://localhost:9494` with the cluster-local endpoint (`https://<image-library-host>:9494`) on any host that does not also hold the Image Library role.
* `glance_cluster = false` disables the default region-wide behavior, so the service does not round robin to other Image Library hosts.

The Compute Service reads this override when booting a VM from an image, and the Persistent Storage Service reads it when creating a volume from an image. Add the block to both override files and restart the corresponding service:

| Service            | Override file                                                    | Restart command                              |
| ------------------ | ---------------------------------------------------------------- | -------------------------------------------- |
| Compute            | `/opt/pf9/etc/nova/conf.d/nova_override.conf`                    | `systemctl restart pf9-ostackhost`           |
| Persistent Storage | `/opt/pf9/etc/pf9-cindervolume-base/conf.d/cinder_override.conf` | `sudo service pf9-cindervolume-base restart` |

## Verify the Configuration

Create a test VM, and a test volume from an image, in the cluster. Confirm that both are served by the cluster-local Image Library host, for example by checking `/var/log/pf9/glance-api.log` on that 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 current page URL with the `ask` query parameter:

```
GET https://docs.platform9.com/private-cloud-director/images-and-image-library/restrict-image-library-to-cluster.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.
