Skip to main content

Proxmox

The Proxmox tools talk to the Proxmox VE API through the endpoints in the proxmox: section of your config, with an API token and no SSH. The tools other than proxmox_script_list and proxmox_script_command accept endpoint and not server: a call that passes the name of a remote server returns tool "<name>" cannot be pointed at a server; use endpoint. The two script tools take neither endpoint nor server, and the same call returns tool "<name>" cannot be pointed at a server. See Proxmox VE for the setup.

proxmox_status​

read

Returns the Proxmox VE version, the cluster status, and the nodes, guests and storage of one endpoint. A collector that fails doesn't fail the call: its name goes into failed_collectors, the reason into warnings, and the class of failure into failure_classes. If the host doesn't answer at all, the other collectors are skipped and get no warning of their own.

Arguments​

ArgumentTypeDescription
endpointstringName of an endpoint in the proxmox: list of your config. It can be left out when exactly one endpoint is configured. With none configured the call returns no Proxmox endpoints configured. Add proxmox entries to your config file. With several, it returns multiple Proxmox endpoints configured; specify endpoint. and the endpoint names.

Response​

FieldTypeMeaning
versionobjectProxmox VE version.
version.versionstringVersion string. Empty when the version collector failed.
version.releasestringRelease string. Empty when the version collector failed.
version.repo_idstring, optionalRepository ID. Left out when Proxmox sent none.
clusterarray of objectsCluster and node entries from the cluster status. Empty when the cluster collector failed.
cluster.idstring, optionalEntry ID, as Proxmox reports it.
cluster.ipstring, optionalNode address.
cluster.levelstring, optionalSupport level, as Proxmox reports it.
cluster.localboolean, optionaltrue for the node that answered.
cluster.namestring, optionalCluster or node name.
cluster.nodeidinteger, optionalNode ID in the cluster.
cluster.nodesinteger, optionalNumber of nodes in the cluster.
cluster.onlineboolean, optionaltrue when the node is online.
cluster.quorateboolean, optionaltrue when the cluster has quorum. Left out when Proxmox sent none.
cluster.typestringcluster or node.
cluster.versioninteger, optionalCluster configuration version.
resourcesobjectEverything the token can see.
resources.nodesarray of objectsNodes.
resources.nodes.cpunumber or null, optionalCPU use as a fraction (0 to 1).
resources.nodes.levelstring, optionalSupport level, as Proxmox reports it.
resources.nodes.localboolean, optionaltrue for the node that answered.
resources.nodes.max_cpunumber or null, optionalNumber of CPUs.
resources.nodes.max_meminteger or null, optionalMemory installed, in bytes.
resources.nodes.meminteger or null, optionalMemory in use, in bytes.
resources.nodes.namestringNode name.
resources.nodes.ssl_fingerprintstring, optionalFingerprint of the node's TLS certificate.
resources.nodes.statusstringNode status, such as online.
resources.nodes.uptimeinteger or null, optionalSeconds since boot.
resources.guestsarray of objectsQEMU and LXC guests in one list, with the fields listed for proxmox_guests.
resources.storagearray of objectsStorage.
resources.storage.contentstring, optionalContent types the storage holds.
resources.storage.namestringStorage name.
resources.storage.nodestring, optionalNode the entry belongs to.
resources.storage.sharedboolean, optionaltrue for shared storage.
resources.storage.statusstring, optionalStorage status.
resources.storage.totalinteger or null, optionalSize, in bytes.
resources.storage.typestring, optionalStorage type, such as dir or zfspool.
resources.storage.usedinteger or null, optionalSpace in use, in bytes.
warningsarray of strings, optionalOne message per collector that failed and ran. Collectors skipped after a connection failure get none. Left out when none failed.
failed_collectorsarray of strings, optionalCollectors that failed: version, cluster or resources. The resources collector also fails when its answer holds no nodes, no guests and no storage, which points to a token with too few permissions. Left out when all answered.
failure_classesobject, optionalThe failure class for each name in failed_collectors: response, tls, authentication, authorization or transport. Left out when none failed.
Examples

With an endpoint whose host refuses connections, the call succeeds and reports the failure inside the document:

{
"version": {
"version": "",
"release": ""
},
"cluster": [],
"resources": {
"nodes": [],
"guests": [],
"storage": []
},
"warnings": [
"version: proxmox request /api2/json/version: Get \"https://127.0.0.1:8199/api2/json/version\": dial tcp 127.0.0.1:8199: connect: connection refused"
],
"failed_collectors": [
"version",
"cluster",
"resources"
],
"failure_classes": {
"cluster": "transport",
"resources": "transport",
"version": "transport"
}
}

With no endpoint in the config, the call returns an error:

no Proxmox endpoints configured. Add proxmox entries to your config file

proxmox_guests​

read

Lists QEMU and LXC guests in one array, optionally filtered by node, status or type. The filters combine with AND.

Arguments​

ArgumentTypeDescription
endpointstringName of an endpoint in the proxmox: list of your config. It can be left out when exactly one endpoint is configured. With none configured the call returns no Proxmox endpoints configured. Add proxmox entries to your config file. With several, it returns multiple Proxmox endpoints configured; specify endpoint. and the endpoint names.
nodestringOnly guests on this node.
statusstringOnly guests with this status, such as running or stopped.
typestringOnly guests of this type: qemu or lxc.

Response​

FieldTypeMeaning
cpunumber or null, optionalCPU use as a fraction of the guest's CPUs (0 to 1). Left out when Proxmox sent none.
diskinteger or null, optionalDisk space in use, in bytes.
lockstring, optionalLock held on the guest, such as backup. Left out when none.
max_cpunumber or null, optionalCPUs assigned, as Proxmox reports it. Left out when Proxmox sent none.
max_diskinteger or null, optionalDisk size, in bytes.
max_meminteger or null, optionalMemory assigned, in bytes.
meminteger or null, optionalMemory in use, in bytes. Left out when Proxmox sent none.
namestring, optionalGuest name. Left out when Proxmox has none.
net_ininteger or null, optionalBytes received.
net_outinteger or null, optionalBytes sent.
nodestringNode that hosts the guest.
poolstring, optionalResource pool. Left out when none.
statusstringGuest status, such as running or stopped.
tagsarray of strings, optionalTags of the guest. Left out when none.
templatebooleantrue for a template.
typestringqemu or lxc.
uptimeinteger or null, optionalSeconds since the guest started.
vmidintegerThe guest's VMID.
Examples

The response is an array of guests with the fields above. An endpoint that doesn't answer returns an error:

Arguments:

{
"type": "qemu",
"status": "running"
}

Response:

proxmox request /api2/json/cluster/resources: Get "https://127.0.0.1:8199/api2/json/cluster/resources": dial tcp 127.0.0.1:8199: connect: connection refused

proxmox_node​

read

Returns the detailed status of one node: CPU, load, memory, CPU model information, and boot mode.

Arguments​

ArgumentTypeDescription
node requiredstringName of the Proxmox node, such as one from proxmox_status.
endpointstringName of an endpoint in the proxmox: list of your config. It can be left out when exactly one endpoint is configured. With none configured the call returns no Proxmox endpoints configured. Add proxmox entries to your config file. With several, it returns multiple Proxmox endpoints configured; specify endpoint. and the endpoint names.

Response​

FieldTypeMeaning
boot_infoobjectHow the node booted.
boot_info.modestring, optionalBoot mode, such as efi or bios.
boot_info.securebootboolean, optionaltrue when Secure Boot is on. Left out when Proxmox sent none.
cpunumber or null, optionalCPU use as a fraction (0 to 1). Left out when Proxmox sent none.
cpuinfoobjectCPU model information.
cpuinfo.coresinteger or null, optionalCores per socket.
cpuinfo.cpusinteger or null, optionalTotal CPUs.
cpuinfo.hvmstringHardware virtualization support, as Proxmox reports it.
cpuinfo.mhzstringClock speed, as a string.
cpuinfo.user_hzinteger or null, optionalKernel clock tick rate, as Proxmox reports it.
loadavgarray of strings, optionalThe 1, 5 and 15 minute load averages, as strings. Left out when Proxmox sent none.
memoryobjectMemory, in bytes.
memory.availableinteger or null, optionalAvailable.
memory.freeinteger or null, optionalFree.
memory.totalinteger or null, optionalInstalled.
memory.usedinteger or null, optionalIn use.
pveversionstring, optionalProxmox VE package version string of the node.
uptimeinteger or null, optionalSeconds since boot.
waitnumber or null, optionalI/O wait as a fraction. Left out when Proxmox sent none.
Examples

An endpoint that doesn't answer returns an error:

Arguments:

{
"node": "pve"
}

Response:

proxmox request /api2/json/nodes/pve/status: Get "https://127.0.0.1:8199/api2/json/nodes/pve/status": dial tcp 127.0.0.1:8199: connect: connection refused

proxmox_tasks​

read

Returns the 50 most recent tasks of a node, running and finished.

Arguments​

ArgumentTypeDescription
node requiredstringName of the Proxmox node, such as one from proxmox_status.
endpointstringName of an endpoint in the proxmox: list of your config. It can be left out when exactly one endpoint is configured. With none configured the call returns no Proxmox endpoints configured. Add proxmox entries to your config file. With several, it returns multiple Proxmox endpoints configured; specify endpoint. and the endpoint names.

Response​

FieldTypeMeaning
endtimeinteger, optionalEnd of the task, in Unix seconds. Left out while the task runs.
idstring, optionalThe guest or object the task acts on, such as a VMID. Left out when none.
nodestringNode the task ran on.
pidinteger, optionalProcess ID of the task. Left out when 0.
pstartinteger, optionalProcess start time, as Proxmox reports it. Left out when 0.
starttimeinteger, optionalStart of the task, in Unix seconds. Left out when 0.
statusstringTask status as Proxmox reports it, such as OK.
typestringTask type, such as qmstart or vzdump.
upidstringThe task ID. Pass it to proxmox_task_status.
userstring, optionalUser that started the task. Left out when none.
Examples

An endpoint that doesn't answer returns an error:

Arguments:

{
"node": "pve"
}

Response:

proxmox request /api2/json/nodes/pve/tasks: Get "https://127.0.0.1:8199/api2/json/nodes/pve/tasks?limit=50&source=all": dial tcp 127.0.0.1:8199: connect: connection refused

proxmox_task_status​

read

Returns the state of one asynchronous task, such as the one that a guest action started. The UPID is opaque: pass it exactly as an earlier call returned it.

Arguments​

ArgumentTypeDescription
endpoint requiredstringName of an endpoint in the proxmox: list of your config. Required: a call that changes or inspects one task never guesses the endpoint.
node requiredstringName of the Proxmox node, such as one from proxmox_status.
upid requiredstringThe task ID, from proxmox_tasks or from the upid of a guest action.

Response​

FieldTypeMeaning
exitstatusstring, optionalOK or the error text of a stopped task. Left out while the task runs.
idstring, optionalThe guest or object the task acts on. Left out when none.
nodestringNode the task ran on.
pidinteger, optionalProcess ID of the task. Left out when 0.
pstartinteger, optionalProcess start time, as Proxmox reports it. Left out when 0.
resultstringA short token for the state: running, ok (stopped with OK), failed (stopped with anything else) or unknown.
starttimeinteger, optionalStart of the task, in Unix seconds. Left out when 0.
statusstringrunning or stopped.
typestringTask type, such as qmstart.
upidstringThe task ID.
userstring, optionalUser that started the task. Left out when none.
Examples

An endpoint name that isn't in the config returns an error:

Arguments:

{
"endpoint": "pve",
"node": "pve",
"upid": "<upid>"
}

Response:

proxmox endpoint "pve" not found in config. Available endpoints: []

proxmox_guest_start​

write

Starts one guest after confirmation and returns the task ID of the queued start. The target is explicit: homebutler doesn't discover the node or the guest type for you. The action uses a separate credential: the endpoint needs action_token_id and action_token or action_token_file in the config, and homebutler never falls back to the read token. A Proxmox request that is lost after it was sent is not retried, because a retry could submit the action twice.

Arguments​

ArgumentTypeDescription
confirm requiredbooleanMust be the boolean true. Without it the call returns confirmation required for Proxmox guest action: endpoint="<endpoint>" node="<node>" type="<type>" vmid=<vmid> action="<action>"; set confirm to true and changes nothing.
endpoint requiredstringName of an endpoint in the proxmox: list of your config. Required: a call that changes or inspects one task never guesses the endpoint.
node requiredstringName of the Proxmox node that hosts the guest. Take it from the node field of proxmox_guests.
type requiredstringGuest type. One of qemu, lxc.
vmid requiredintegerThe guest's VMID, from 1 through 999999999. Take it from the vmid field of proxmox_guests.

Response​

FieldTypeMeaning
actionstringstart, shutdown or reboot.
endpointstringThe endpoint that was used.
nodestringThe node that hosts the guest.
statusstringAlways accepted: Proxmox queued the task. Whether the guest changed state is the answer of proxmox_task_status.
typestringqemu or lxc.
upidstringThe task ID that Proxmox returned, unchanged. Pass it to proxmox_task_status.
vmidintegerThe guest's VMID.
Examples

Without confirm, the call returns an error and changes nothing:

Arguments:

{
"endpoint": "pve",
"node": "pve",
"type": "qemu",
"vmid": 100
}

Response:

confirmation required for Proxmox guest action: endpoint="pve" node="pve" type="qemu" vmid=100 action="start"; set confirm to true

With confirm set but no action credential in the config, the call returns an error before it reads any token:

Arguments:

{
"endpoint": "pve",
"node": "pve",
"type": "qemu",
"vmid": 100,
"confirm": true
}

Response:

no action credential configured for Proxmox endpoint "pve"; guest actions require action_token_id and action_token or action_token_file — see docs/proxmox.md

proxmox_guest_reboot​

write

Reboots one guest after confirmation and returns the task ID of the queued reboot. The action uses a separate credential: the endpoint needs action_token_id and action_token or action_token_file in the config, and homebutler never falls back to the read token. A Proxmox request that is lost after it was sent is not retried, because a retry could submit the action twice.

Arguments​

ArgumentTypeDescription
confirm requiredbooleanMust be the boolean true. Without it the call returns confirmation required for Proxmox guest action: endpoint="<endpoint>" node="<node>" type="<type>" vmid=<vmid> action="<action>"; set confirm to true and changes nothing.
endpoint requiredstringName of an endpoint in the proxmox: list of your config. Required: a call that changes or inspects one task never guesses the endpoint.
node requiredstringName of the Proxmox node that hosts the guest. Take it from the node field of proxmox_guests.
type requiredstringGuest type. One of qemu, lxc.
vmid requiredintegerThe guest's VMID, from 1 through 999999999. Take it from the vmid field of proxmox_guests.

Response​

FieldTypeMeaning
actionstringstart, shutdown or reboot.
endpointstringThe endpoint that was used.
nodestringThe node that hosts the guest.
statusstringAlways accepted: Proxmox queued the task. Whether the guest changed state is the answer of proxmox_task_status.
typestringqemu or lxc.
upidstringThe task ID that Proxmox returned, unchanged. Pass it to proxmox_task_status.
vmidintegerThe guest's VMID.
Examples

A type other than qemu or lxc returns an error:

Arguments:

{
"endpoint": "pve",
"node": "pve",
"type": "vm",
"vmid": 100,
"confirm": true
}

Response:

proxmox guest type must be qemu or lxc

proxmox_guest_shutdown​

destructive

Shuts one guest down gracefully after confirmation and returns the task ID of the queued shutdown. There is no tool for a hard stop. The action uses a separate credential: the endpoint needs action_token_id and action_token or action_token_file in the config, and homebutler never falls back to the read token. A Proxmox request that is lost after it was sent is not retried, because a retry could submit the action twice.

Arguments​

ArgumentTypeDescription
confirm requiredbooleanMust be the boolean true. Without it the call returns confirmation required for Proxmox guest action: endpoint="<endpoint>" node="<node>" type="<type>" vmid=<vmid> action="<action>"; set confirm to true and changes nothing.
endpoint requiredstringName of an endpoint in the proxmox: list of your config. Required: a call that changes or inspects one task never guesses the endpoint.
node requiredstringName of the Proxmox node that hosts the guest. Take it from the node field of proxmox_guests.
type requiredstringGuest type. One of qemu, lxc.
vmid requiredintegerThe guest's VMID, from 1 through 999999999. Take it from the vmid field of proxmox_guests.

Response​

FieldTypeMeaning
actionstringstart, shutdown or reboot.
endpointstringThe endpoint that was used.
nodestringThe node that hosts the guest.
statusstringAlways accepted: Proxmox queued the task. Whether the guest changed state is the answer of proxmox_task_status.
typestringqemu or lxc.
upidstringThe task ID that Proxmox returned, unchanged. Pass it to proxmox_task_status.
vmidintegerThe guest's VMID.
Examples

A VMID outside the range returns an error:

Arguments:

{
"endpoint": "pve",
"node": "pve",
"type": "lxc",
"vmid": 0,
"confirm": true
}

Response:

proxmox VMID must be between 1 and 999999999

proxmox_script_list​

read

Lists the curated Proxmox VE Community Scripts catalog. The catalog is compiled into the binary and the call reaches no network. The tool takes no endpoint argument.

Arguments​

This tool takes no arguments.

Response​

FieldTypeMeaning
slugstringShort name. Pass it to proxmox_script_command.
namestringDisplay name.
descriptionstringWhat the script installs.
Examples

The response is an array with one entry per script:

[
{
"slug": "docker",
"name": "Docker",
"description": "Docker CE and Docker Compose in an LXC"
},
{
"slug": "homeassistant",
"name": "Home Assistant",
"description": "Home Assistant Core in an LXC"
},
{
"slug": "nginxproxymanager",
"name": "Nginx Proxy Manager",
"description": "Nginx Proxy Manager in an LXC"
},
{
"slug": "pihole",
"name": "Pi-hole",
"description": "Pi-hole DNS ad-blocker in an LXC"
},
{
"slug": "postgresql",
"name": "PostgreSQL",
"description": "PostgreSQL database server in an LXC"
}
]

proxmox_script_command​

read

Renders the install command for one Community Script, pinned to one commit of the upstream repository. homebutler never fetches or runs the script: the user reviews the command and runs it on the Proxmox host.

Arguments​

ArgumentTypeDescription
slug requiredstringScript slug, from proxmox_script_list. An unknown slug returns unknown Proxmox Community Script "<slug>"; use the script catalog to see available slugs.

Response​

FieldTypeMeaning
slugstringThe slug you passed.
commandstringThe command to run on the Proxmox host.
warningstringA notice that the script is not reviewed by homebutler and runs as root on the Proxmox host. Show it to the user with the command.
Examples

Arguments:

{
"slug": "docker"
}

Response:

{
"slug": "docker",
"command": "bash -c \"$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/fadcb0c375547861f991c09ff8dec196c380d428/ct/docker.sh)\"",
"warning": "This script is not reviewed by homebutler. It is fetched from community-scripts/ProxmoxVE and runs as root on the Proxmox host."
}