Development guidelines
Here you can find definitions of the formats used for serializing and storing StorPool Proxmox VE data. This information is mainly intended for developers who work on improving the plugin.
Note
Boolean values are encoded as “0” or “1” when represented as strings.
Object names stored in the Proxmox VE database
The object name is stored as a string resembling a filename, but structured. The types of objects supported by the StorPool plugin are as follows:
Tag |
Type |
Description |
---|---|---|
vm-<vm_id>-disk-<disk_id>-sp-<global_id>.raw |
volume |
A disk attached to a VM |
base-<vm_id>-disk-<disk_id>-sp-<global_id>.raw |
snapshot |
A disk attached to a VM template. |
snap-<vm_id>-disk-<disk_id>-<snapshot_id>-p-<parent_id>-sp-<global_id>.raw |
snapshot |
A Proxmox snapshot of a VM disk. |
snap-<vm_id>-state-<snapshot_id>-sp-<global_id>.raw |
volume |
A Proxmox snapshot of the current state (RAM, CPU, and so on) of a running VM. |
img-<id>-sp-<global_id>.raw |
snapshot |
A ‘freestanding’ disk image, one not attached to any VM, but uploaded to the StorPool-backed storage in some other way. This may be ,for example, a cloud image to be imported as a VM’s root disk. |
<id>-sp-<global_id>.iso |
snapshot |
An ISO image to attach to VMs as a CD/DVD drive. |
Some field clarifications:
The vm_id portion must consist of digits only, and must represent a decimal non-negative integer number not less than 100.
The disk_id portion must consist of digits only, and must represent a decimal non-negative integer number.
The global_id portion must be a valid StorPool global ID; it identifies the volume or snapshot where the data is stored.
The snapshot_id portion must be in the Proxmox identifier format.
The parent_id portion must be a valid StorPool global ID.
The id portion must be in the Proxmox identifier format.