> For the complete documentation index, see [llms.txt](https://documentation.ocsinventory-ng.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.ocsinventory-ng.org/ocs-inventory-v3-extensions/proxmox-api/proxmox-inventory-and-templates.md).

# Proxmox Inventory and Templates

A Proxmox asset is a virtual machine or container hosted on a Proxmox hypervisor. It uses the same inventory model as standard OCS assets.

As with standard OCS asset inventories, Proxmox assets are composed of two main elements: the base inventory and the template inventory.

## Assets

There are two ways to view Proxmox assets:

### View all assets

{% stepper %}
{% step %}
Navigate to **Inventory → General → Proxmox Inventory.**

You will see all Proxmox assets.
{% endstep %}

{% step %}
Select a hypervisor to see only the corresponding assets.
{% endstep %}
{% endstepper %}

<figure><img src="https://3061656006-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl1Ar7IGwmD0AGPF9lYkJ%2Fuploads%2FXax6h2x3LfA4m7cfR0iB%2Focs-proxmox2.png?alt=media&amp;token=2af4e99e-d321-4411-b777-fbeda0c75cac" alt="Proxmox inventory dashboard view"><figcaption><p>Proxmox inventory dashboard view</p></figcaption></figure>

### View assets corresponding to an hypervisor

{% stepper %}
{% step %}
Navigate to **Configuration → Inventory → Proxmox Hypervisors.**
{% endstep %}

{% step %}
Click the **View assets** button (display icon) on the hypervisor you want.

You'll see the assets that correspond to this hypervisor.
{% endstep %}

{% step %}
Select **All** or another hypervisor from the list.
{% endstep %}
{% endstepper %}

## Base inventory

The base inventory provides a default set of core information about an asset. This inventory is always available and includes the following fields by default:

* **Name**: name of the container/VM in Proxmox.
* **Description**
* **Serial Number**: generated from the hypervisor's name in the app, the last part of the UUID, and the ID on the Proxmox server.
* **OS Name**
* **OS Version**: cannot currently be retrieved.
* **UUID**
* **IP Address**
* **MAC Address**
* **Domain**: cannot currently be retrieved.
* **Agent Version**: Proxmox API x.x.x

## Template inventory

To extend the base inventory, OCS uses a template system. Templates add extra fields and define which method should be used to retrieve the corresponding data.

{% hint style="info" %}
More details are available on the [**Inventory and Templates**](/user-docs/asset-management/inventory-and-templates.md) page.
{% endhint %}

## Preloaded Templates

By default, OCS includes six preloaded templates. This extension adds two more, also available under **Configuration → Inventory → Templates**:

* Proxmox QEMU VM
* Proxmox LXC Container

<figure><img src="https://3061656006-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl1Ar7IGwmD0AGPF9lYkJ%2Fuploads%2FkymcbwHNvwr9bTA00Eiz%2Fimage_2026-07-29_110149925.png?alt=media&amp;token=d19e002b-6993-45ef-8b19-ef146d7c57ca" alt="Template fields and their retrieval methods for Proxmox QEMU VM"><figcaption><p>Template fields and their retrieval methods for Proxmox QEMU VM</p></figcaption></figure>

## Template assignment

### Using Rules (automatic)

Templates are assigned to assets based on their Proxmox resource type. OCS uses the Rule Engine to determine and apply the correct template the first time an asset reports its inventory.

Out of the box, this OCS extension provides two predefined rules, evaluated against the Proxmox resource type field, used to assign templates automatically:

|     Field evaluated    | Value(s) expected |        Template       |
| :--------------------: | :---------------: | :-------------------: |
| Proxmox ressource type |        qemu       |    Proxmox QEMU VM    |
| Proxmox ressource type |        lxc        | Proxmox LXC Container |

{% hint style="info" %}
Note on automatic assignment:

* Rules are evaluated with each incoming inventory.
* If no rule matches, the asset will only report using base inventory.
* Template assignment can also be switched to manual selection per device. More details are available on the [Managing Rules](https://documentation.ocsinventory-ng.org/) page.
  {% endhint %}

### Manual Template assignment

In addition to automatic assignment, templates can be manually assigned to an asset from its detail page, like any standard OCS asset.

To manually assign a template:

1. Navigate to the asset's detail page.
2. On the right side, click the **Options** icon.
3. Select **Assign inventory template** from the drop-down menu.
4. Choose the desired template for the asset from the list.

{% hint style="info" %}
A manually assigned template is never overridden by rules.
{% endhint %}

To switch back to automatic assignment:

1. Open the asset's detail page.
2. Click the **Options** icon at the top right.
3. In the drop-down menu, select **Reset inventory template**.

The template will be reset, and a new one will be automatically assigned during the next inventory if a rule matches.


---

# 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://documentation.ocsinventory-ng.org/ocs-inventory-v3-extensions/proxmox-api/proxmox-inventory-and-templates.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.
