Авторские статьи

Proxmox VE API. Cluster.


/cluster



/cluster


GET
Description: Cluster index.
Permissions:

User Permissions Description
all N/A N/A

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/cluster
CLI pvesh get /cluster



/cluster/firewall


GET
Description: Directory index.
Permissions:

User Permissions Description
all N/A N/A

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/cluster/firewall
CLI pvesh get /cluster/firewall



/cluster/firewall/groups


GET
Description: List security groups.
Permissions:

User Permissions Description
all N/A N/A

Return:
array

Name Type Format Description Optional
comment string N/A N/A
group string N/A Security Group name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Usage:
HTTP GET /api2/json/cluster/firewall/groups
CLI pvesh get /cluster/firewall/groups

POST
Description: Create new security group.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
rename string N/A Rename/update an existing security group. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing group.
comment string N/A N/A
group string N/A Security Group name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP POST /api2/json/cluster/firewall/groups
CLI pvesh create /cluster/firewall/groups



/cluster/firewall/groups/{group}


GET
Description: List rules.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
group string N/A Security Group name.

Return:
array

Name Type Format Description Optional
pos integer N/A N/A

Usage:
HTTP GET /api2/json/cluster/firewall/groups/{group}
CLI pvesh get /cluster/firewall/groups/{group}

POST
Description: Create new rule.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
enable integer N/A N/A
group string N/A Security Group name.
dport string pve-fw-port-spec N/A
proto string pve-fw-protocol-spec N/A
dest string pve-fw-addr-spec N/A
macro string N/A N/A
pos integer N/A Update rule at position
.
source string pve-fw-addr-spec N/A
iface string pve-iface Network interface name.
action string N/A Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.
sport string pve-fw-port-spec N/A
type string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP POST /api2/json/cluster/firewall/groups/{group}
CLI pvesh create /cluster/firewall/groups/{group}

DELETE
Description: Delete security group.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
group string N/A Security Group name.

Return:
null
Usage:
HTTP DELETE /api2/json/cluster/firewall/groups/{group}
CLI pvesh delete /cluster/firewall/groups/{group}



/cluster/firewall/groups/{group}/{pos}


GET
Description: Get single rule data.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
group string N/A Security Group name.
pos integer N/A Update rule at position
.

Return:
object

Name Type Format Description Optional
pos integer N/A N/A

Usage:
HTTP GET /api2/json/cluster/firewall/groups/{group}/{pos}
CLI pvesh get /cluster/firewall/groups/{group}/{pos}

PUT
Description: Modify rule data.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
moveto integer N/A Move rule to new position . Other arguments are ignored.
enable integer N/A N/A
group string N/A Security Group name.
dport string pve-fw-port-spec N/A
proto string pve-fw-protocol-spec N/A
dest string pve-fw-addr-spec N/A
macro string N/A N/A
pos integer N/A Update rule at position
.
source string pve-fw-addr-spec N/A
iface string pve-iface Network interface name.
action string N/A Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.
sport string pve-fw-port-spec N/A
type string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/cluster/firewall/groups/{group}/{pos}
CLI pvesh set /cluster/firewall/groups/{group}/{pos}

DELETE
Description: Delete rule.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
group string N/A Security Group name.
pos integer N/A Update rule at position
.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP DELETE /api2/json/cluster/firewall/groups/{group}/{pos}
CLI pvesh delete /cluster/firewall/groups/{group}/{pos}



/cluster/firewall/rules


GET
Description: List rules.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Return:
array

Name Type Format Description Optional
pos integer N/A N/A

Usage:
HTTP GET /api2/json/cluster/firewall/rules
CLI pvesh get /cluster/firewall/rules

POST
Description: Create new rule.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
iface string pve-iface Network interface name.
proto string pve-fw-protocol-spec N/A
dest string pve-fw-addr-spec N/A
macro string N/A N/A
pos integer N/A Update rule at position
.
action string N/A Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.
enable integer N/A N/A
source string pve-fw-addr-spec N/A
dport string pve-fw-port-spec N/A
sport string pve-fw-port-spec N/A
type string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP POST /api2/json/cluster/firewall/rules
CLI pvesh create /cluster/firewall/rules



/cluster/firewall/rules/{pos}


GET
Description: Get single rule data.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
pos integer N/A Update rule at position
.

Return:
object

Name Type Format Description Optional
pos integer N/A N/A

Usage:
HTTP GET /api2/json/cluster/firewall/rules/{pos}
CLI pvesh get /cluster/firewall/rules/{pos}

PUT
Description: Modify rule data.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
moveto integer N/A Move rule to new position . Other arguments are ignored.
enable integer N/A N/A
dport string pve-fw-port-spec N/A
proto string pve-fw-protocol-spec N/A
dest string pve-fw-addr-spec N/A
macro string N/A N/A
pos integer N/A Update rule at position
.
source string pve-fw-addr-spec N/A
iface string pve-iface Network interface name.
action string N/A Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.
sport string pve-fw-port-spec N/A
type string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/cluster/firewall/rules/{pos}
CLI pvesh set /cluster/firewall/rules/{pos}

DELETE
Description: Delete rule.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
pos integer N/A Update rule at position
.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP DELETE /api2/json/cluster/firewall/rules/{pos}
CLI pvesh delete /cluster/firewall/rules/{pos}



/cluster/firewall/ipset


GET
Description: List IPSets
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Return:
array

Name Type Format Description Optional
comment string N/A N/A
name string N/A IP set name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Usage:
HTTP GET /api2/json/cluster/firewall/ipset
CLI pvesh get /cluster/firewall/ipset

POST
Description: Create new IPSet
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
rename string N/A Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.
comment string N/A N/A
name string N/A IP set name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP POST /api2/json/cluster/firewall/ipset
CLI pvesh create /cluster/firewall/ipset



/cluster/firewall/ipset/{name}


GET
Description: List IPSet content
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
name string N/A IP set name.

Return:
array

Name Type Format Description Optional
comment string N/A N/A
cidr string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
nomatch boolean N/A N/A

Usage:
HTTP GET /api2/json/cluster/firewall/ipset/{name}
CLI pvesh get /cluster/firewall/ipset/{name}

POST
Description: Add IP or Network to IPSet.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
cidr string IPorCIDRorAlias Network/IP specification in CIDR format.
name string N/A IP set name.
nomatch boolean N/A N/A

Return:
null
Usage:
HTTP POST /api2/json/cluster/firewall/ipset/{name}
CLI pvesh create /cluster/firewall/ipset/{name}

DELETE
Description: Delete IPSet
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
name string N/A IP set name.

Return:
null
Usage:
HTTP DELETE /api2/json/cluster/firewall/ipset/{name}
CLI pvesh delete /cluster/firewall/ipset/{name}



/cluster/firewall/ipset/{name}/{cidr}


GET
Description: Read IP or Network settings from IPSet.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
cidr string IPorCIDRorAlias Network/IP specification in CIDR format.
name string N/A IP set name.

Return:
object
Usage:
HTTP GET /api2/json/cluster/firewall/ipset/{name}/{cidr}
CLI pvesh get /cluster/firewall/ipset/{name}/{cidr}

PUT
Description: Update IP or Network settings
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
cidr string IPorCIDRorAlias Network/IP specification in CIDR format.
name string N/A IP set name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
nomatch boolean N/A N/A

Return:
null
Usage:
HTTP PUT /api2/json/cluster/firewall/ipset/{name}/{cidr}
CLI pvesh set /cluster/firewall/ipset/{name}/{cidr}

DELETE
Description: Remove IP or Network from IPSet.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
cidr string IPorCIDRorAlias Network/IP specification in CIDR format.
name string N/A IP set name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP DELETE /api2/json/cluster/firewall/ipset/{name}/{cidr}
CLI pvesh delete /cluster/firewall/ipset/{name}/{cidr}



/cluster/firewall/aliases


GET
Description: List aliases
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Return:
array

Name Type Format Description Optional
comment string N/A N/A
cidr string N/A N/A
name string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Usage:
HTTP GET /api2/json/cluster/firewall/aliases
CLI pvesh get /cluster/firewall/aliases

POST
Description: Create IP or Network Alias.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
cidr string IPorCIDR Network/IP specification in CIDR format.
name string N/A Alias name.

Return:
null
Usage:
HTTP POST /api2/json/cluster/firewall/aliases
CLI pvesh create /cluster/firewall/aliases



/cluster/firewall/aliases/{name}


GET
Description: Read alias.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
name string N/A Alias name.

Return:
object
Usage:
HTTP GET /api2/json/cluster/firewall/aliases/{name}
CLI pvesh get /cluster/firewall/aliases/{name}

PUT
Description: Update IP or Network alias.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
rename string N/A Rename an existing alias.
comment string N/A N/A
cidr string IPorCIDR Network/IP specification in CIDR format.
name string N/A Alias name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP PUT /api2/json/cluster/firewall/aliases/{name}
CLI pvesh set /cluster/firewall/aliases/{name}

DELETE
Description: Remove IP or Network alias.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
name string N/A Alias name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP DELETE /api2/json/cluster/firewall/aliases/{name}
CLI pvesh delete /cluster/firewall/aliases/{name}



/cluster/firewall/options


GET
Description: Get Firewall options.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Return:
object

Name Type Format Description Optional
policy_out string N/A Output policy.
enable integer N/A N/A
policy_in string N/A Input policy.

Usage:
HTTP GET /api2/json/cluster/firewall/options
CLI pvesh get /cluster/firewall/options

PUT
Description: Set Firewall options.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
policy_out string N/A Output policy.
enable integer N/A N/A
policy_in string N/A Input policy.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/cluster/firewall/options
CLI pvesh set /cluster/firewall/options



/cluster/firewall/macros


GET
Description: List available macros
Permissions:

User Permissions Description
all N/A N/A

Return:
array

Name Type Format Description Optional
macro string N/A Macro name.
descr string N/A More verbose description (if available).

Usage:
HTTP GET /api2/json/cluster/firewall/macros
CLI pvesh get /cluster/firewall/macros



/cluster/firewall/refs


GET
Description: Lists possible IPSet/Alias reference which are allowed in source/dest properties.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
type string N/A Only list references of specified type.

Return:
array

Name Type Format Description Optional
comment string N/A N/A
type string N/A N/A
ref string N/A N/A
name string N/A N/A

Usage:
HTTP GET /api2/json/cluster/firewall/refs
CLI pvesh get /cluster/firewall/refs



/cluster/backup


GET
Description: List vzdump backup schedule.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Return:
array

Name Type Format Description Optional
id string N/A N/A

Usage:
HTTP GET /api2/json/cluster/backup
CLI pvesh get /cluster/backup

POST
Description: Create new vzdump backup job.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
all boolean N/A Backup all known VMs on this host.
enabled boolean N/A Enable or disable the job.
ionice integer N/A Set CFQ ionice priority.
mailnotification string N/A Specify when to send an email
exclude string pve-vmid-list exclude specified VMs (assumes --all)
bwlimit integer N/A Limit I/O bandwidth (KBytes per second).
tmpdir string N/A Store temporary files to specified directory.
size integer N/A LVM snapshot size in MB.
mailto string string-list
script string N/A Use specified hook script.
storage string pve-storage-id Store resulting file to this storage.
exclude-path string string-alist exclude certain files/directories (shell globs).
mode string N/A Backup mode.
node string pve-node Only run if executed on this node.
maxfiles integer N/A Maximal number of backup files per VM.
compress string N/A Compress dump file.
stop boolean N/A Stop runnig backup jobs on this host.
dumpdir string N/A Store resulting files to specified directory.
pigz integer N/A Uses pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.
vmid string pve-vmid-list The ID of the VM you want to backup.
quiet boolean N/A Be quiet.
remove boolean N/A Remove old backup files if there are more than 'maxfiles' backup files.
lockwait integer N/A Maximal time to wait for the global lock (minutes).
stdexcludes boolean N/A Exclude temorary files and logs.
starttime string N/A Job Start time.
stopwait integer N/A Maximal time to wait until a VM is stopped (minutes).
dow string pve-day-of-week-list Day of week selection.

Return:
null
Usage:
HTTP POST /api2/json/cluster/backup
CLI pvesh create /cluster/backup



/cluster/backup/{id}


GET
Description: Read vzdump backup job definition.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
id string N/A The job ID.

Return:
object
Usage:
HTTP GET /api2/json/cluster/backup/{id}
CLI pvesh get /cluster/backup/{id}

PUT
Description: Update vzdump backup job definition.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
all boolean N/A Backup all known VMs on this host.
enabled boolean N/A Enable or disable the job.
exclude string pve-vmid-list exclude specified VMs (assumes --all)
mailnotification string N/A Specify when to send an email
ionice integer N/A Set CFQ ionice priority.
id string N/A The job ID.
tmpdir string N/A Store temporary files to specified directory.
size integer N/A LVM snapshot size in MB.
mailto string string-list
script string N/A Use specified hook script.
storage string pve-storage-id Store resulting file to this storage.
exclude-path string string-alist exclude certain files/directories (shell globs).
bwlimit integer N/A Limit I/O bandwidth (KBytes per second).
stdexcludes boolean N/A Exclude temorary files and logs.
node string pve-node Only run if executed on this node.
maxfiles integer N/A Maximal number of backup files per VM.
stop boolean N/A Stop runnig backup jobs on this host.
compress string N/A Compress dump file.
dumpdir string N/A Store resulting files to specified directory.
pigz integer N/A Uses pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.
vmid string pve-vmid-list The ID of the VM you want to backup.
quiet boolean N/A Be quiet.
remove boolean N/A Remove old backup files if there are more than 'maxfiles' backup files.
lockwait integer N/A Maximal time to wait for the global lock (minutes).
mode string N/A Backup mode.
starttime string N/A Job Start time.
stopwait integer N/A Maximal time to wait until a VM is stopped (minutes).
dow string pve-day-of-week-list Day of week selection.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/cluster/backup/{id}
CLI pvesh set /cluster/backup/{id}

DELETE
Description: Delete vzdump backup job definition.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
id string N/A The job ID.

Return:
null
Usage:
HTTP DELETE /api2/json/cluster/backup/{id}
CLI pvesh delete /cluster/backup/{id}



/cluster/ha


GET
Description: Directory index.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Return:
array

Name Type Format Description Optional
id string N/A N/A

Usage:
HTTP GET /api2/json/cluster/ha
CLI pvesh get /cluster/ha



/cluster/ha/resources


GET
Description: List HA resources.
Parameters:

Name Type Format Description Optional
type string N/A Only list resources of specific type

Return:
array

Name Type Format Description Optional
sid string N/A N/A

Usage:
HTTP GET /api2/json/cluster/ha/resources
CLI pvesh get /cluster/ha/resources

POST
Description: Create a new HA resource.
Parameters:

Name Type Format Description Optional
comment string N/A Description.
group string pve-configid The HA group identifier.
state string N/A Resource state.
max_restart integer N/A Maximal number of tries to restart the service on a node after its start failed.
sid string pve-ha-resource-or-vm-id HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).
max_relocate integer N/A Maximal number of service relocate tries when a service failes to start.
type string N/A Resource type.

Return:
null
Usage:
HTTP POST /api2/json/cluster/ha/resources
CLI pvesh create /cluster/ha/resources



/cluster/ha/resources/{sid}


GET
Description: Read resource configuration.
Parameters:

Name Type Format Description Optional
sid string pve-ha-resource-or-vm-id HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).

Return:
Usage:
HTTP GET /api2/json/cluster/ha/resources/{sid}
CLI pvesh get /cluster/ha/resources/{sid}

PUT
Description: Update resource configuration.
Parameters:

Name Type Format Description Optional
comment string N/A Description.
group string pve-configid The HA group identifier.
state string N/A Resource state.
max_restart integer N/A Maximal number of tries to restart the service on a node after its start failed.
sid string pve-ha-resource-or-vm-id HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).
max_relocate integer N/A Maximal number of service relocate tries when a service failes to start.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/cluster/ha/resources/{sid}
CLI pvesh set /cluster/ha/resources/{sid}

DELETE
Description: Delete resource configuration.
Parameters:

Name Type Format Description Optional
sid string pve-ha-resource-or-vm-id HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).

Return:
null
Usage:
HTTP DELETE /api2/json/cluster/ha/resources/{sid}
CLI pvesh delete /cluster/ha/resources/{sid}



/cluster/ha/resources/{sid}/migrate


POST
Description: Request resource migration (online) to another node.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
sid string pve-ha-resource-or-vm-id HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).

Return:
null
Usage:
HTTP POST /api2/json/cluster/ha/resources/{sid}/migrate
CLI pvesh create /cluster/ha/resources/{sid}/migrate



/cluster/ha/resources/{sid}/relocate


POST
Description: Request resource relocatzion to another node. This stops the service on the old node, and restarts it on the target node.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
sid string pve-ha-resource-or-vm-id HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).

Return:
null
Usage:
HTTP POST /api2/json/cluster/ha/resources/{sid}/relocate
CLI pvesh create /cluster/ha/resources/{sid}/relocate



/cluster/ha/groups


GET
Description: Get HA groups.
Return:
array

Name Type Format Description Optional
group string N/A N/A

Usage:
HTTP GET /api2/json/cluster/ha/groups
CLI pvesh get /cluster/ha/groups

POST
Description: Create a new HA group.
Parameters:

Name Type Format Description Optional
comment string N/A Description.
group string pve-configid The HA group identifier.
nofailback boolean N/A The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior.
restricted boolean N/A Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.
nodes string pve-ha-group-node-list List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').
type string N/A Group type.

Return:
null
Usage:
HTTP POST /api2/json/cluster/ha/groups
CLI pvesh create /cluster/ha/groups



/cluster/ha/groups/{group}


GET
Description: Read ha group configuration.
Parameters:

Name Type Format Description Optional
group string pve-configid The HA group identifier.

Return:
Usage:
HTTP GET /api2/json/cluster/ha/groups/{group}
CLI pvesh get /cluster/ha/groups/{group}

PUT
Description: Update ha group configuration.
Parameters:

Name Type Format Description Optional
comment string N/A Description.
group string pve-configid The HA group identifier.
nofailback boolean N/A The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior.
restricted boolean N/A Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.
nodes string pve-ha-group-node-list List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/cluster/ha/groups/{group}
CLI pvesh set /cluster/ha/groups/{group}

DELETE
Description: Delete ha group configuration.
Parameters:

Name Type Format Description Optional
group string pve-configid The HA group identifier.

Return:
null
Usage:
HTTP DELETE /api2/json/cluster/ha/groups/{group}
CLI pvesh delete /cluster/ha/groups/{group}



/cluster/ha/status


GET
Description: Directory index.
Permissions:

User Permissions Description
all N/A N/A

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/cluster/ha/status
CLI pvesh get /cluster/ha/status



/cluster/ha/status/current


GET
Description: Get HA manger status.
Return:
array
Usage:
HTTP GET /api2/json/cluster/ha/status/current
CLI pvesh get /cluster/ha/status/current



/cluster/ha/status/manager_status


GET
Description: Get full HA manger status, including LRM status.
Return:
object
Usage:
HTTP GET /api2/json/cluster/ha/status/manager_status
CLI pvesh get /cluster/ha/status/manager_status



/cluster/log


GET
Description: Read cluster log
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
max integer N/A Maximum number of entries.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/cluster/log
CLI pvesh get /cluster/log



/cluster/resources


GET
Description: Resources index (cluster wide).
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
type string N/A N/A

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/cluster/resources
CLI pvesh get /cluster/resources



/cluster/tasks


GET
Description: List recent tasks (cluster wide).
Permissions:

User Permissions Description
all N/A N/A

Return:
array

Name Type Format Description Optional
upid string N/A N/A

Usage:
HTTP GET /api2/json/cluster/tasks
CLI pvesh get /cluster/tasks



/cluster/options


GET
Description: Get datacenter options.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Return:
object

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/cluster/options
CLI pvesh get /cluster/options

PUT
Description: Set datacenter options.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
http_proxy string N/A Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/')
console string N/A Select the default Console viewer. You can either use the builtin java applet (VNC), an external virt-viewer comtatible application (SPICE), or an HTML5 based viewer (noVNC).
language string N/A Default GUI language.
migration_unsecure boolean N/A Migration is secure using SSH tunnel by default. For secure private networks you can disable it to speed up migration.
keyboard string N/A Default keybord layout for vnc server.
email_from string email-opt Specify email address to send notification from (default is root@$hostname)
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/cluster/options
CLI pvesh set /cluster/options



/cluster/status


GET
Description: Get cluster status informations.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Audit']] N/A

Return:
array

Name Type Format Description Optional
type string N/A N/A

Usage:
HTTP GET /api2/json/cluster/status
CLI pvesh get /cluster/status



/cluster/nextid


GET
Description: Get next free VMID. If you pass an VMID it will raise an error if the ID is already used.
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
vmid integer pve-vmid The (unique) ID of the VM.

Return:
integer
Usage:
HTTP GET /api2/json/cluster/nextid
CLI pvesh get /cluster/nextid

Proxmox VE API. Access.
Proxmox VE API. Storage.
Proxmox VE API. Pools.
Proxmox VE API. Versions.
Proxmox VE API. Nodes.

Дата последней правки: 2024-03-28 09:43:16

RSS vasilisc.com   


Разделы

Главная
Новости
Ворох бумаг
Видео Linux
Игры в Linux
Безопасность
Статьи об Astra Linux
Статьи о FreeBSD
Статьи об Ubuntu
Статьи о Snappy
Статьи об Ubuntu Phone
Статьи о Kubuntu
Статьи о Xubuntu
Статьи о Lubuntu
Статьи об Open Source
Карта сайта