NAME
Net::Proxmox::VE::Cluster - Functions for the 'cluster' portion of the API
VERSION
version 0.37
SYNOPSIS
# assuming $obj is a Net::Proxmox::VE object
METHODS
cluster
Returns the 'Cluster index':
@list = $obj->cluster()
Note: Accessible by all authententicated users.
cluster_backup
List vzdump backup schedule.
@list = $obj->cluster_backup()
Note: Accessible by all authententicated users.
create_cluster_backup
Create new vzdump backup job.
$ok = $obj->create_cluster_backup(\%args)
node is a string in pve-node format
%args may items contain from the following list
- starttime
-
String. Job start time, format is HH::MM. Required.
- all
-
Boolean. Backup all known VMs on this host. Required.
- bwlimit
-
Integer. Limit I/O bandwidth (KBytes per second). Optional.
- compress
-
Enum. Either 0, 1, gzip or lzo. Comress dump file. Optional
- dow
-
String. Day of the week in pve-day-of-week-list format. Optional.
- dumpdir
-
String. Store resulting files to specified directory. Optional.
- exclude
-
String. Exclude specified VMs (assumes --all) in pve-vmid-list. Optional.
- exclude-path
-
String. Exclude certain files/directories (regex) in string-alist. Optional.
- ionice
-
Integer. Set CFQ ionice priority. Optional.
- lockwait
-
Integer. Maximal time to wait for the global lock (minutes). Optional.
- mailto
-
String. List of email addresses in string-list format. Optional.
- maxfiles
-
Integer. Maximal number of backup files per vm. Optional.
- mode
-
Enum. A value from snapshot, suspend or stop. Backup mode. Optional.
- node
-
String. Only run if executed on this node in pve-node format. Optional.
- quiet
-
Boolean. Be quiet. Optional.
- remove
-
Boolean. Remove old backup files if there are more than 'maxfiles' backup files. Optional.
- script
-
String. Use specified hook script. Optional.
- size
-
Integer. LVM snapshot size in MB. Optional.
- stdexcludes
-
Boolean. Exclude temporary files and logs. Optional.
- stopwait
-
Integer. Maximal time to wait until a VM is stopped (minutes). Optional.
- storage
-
String. Store resulting file to this storage, in pve-storage-id format. Optional.
- tmpdir
-
String. Store temporary files to specified directory. Optional.
- vmid
-
String. The ID of the VM you want to backup in pve-vm-list format. Optional.
Note: required permissions are ["perm","/",["Sys.Modify"]]
get_cluster_backup
Read vzdump backup job definition.
$job = $obj->get_cluster_backup('id')
id is the job ID
Note: required permissions are ["perm","/",["Sys.Audit"]]
update_cluster_backup
Update vzdump backup job definition.
$ok = $obj->update_cluster_backup(\%args)
id is the job ID
%args may items contain from the following list
- starttime
-
String. Job start time, format is HH::MM. Required.
- all
-
Boolean. Backup all known VMs on this host. Required.
- bwlimit
-
Integer. Limit I/O bandwidth (KBytes per second). Optional.
- compress
-
Enum. Either 0, 1, gzip or lzo. Comress dump file. Optional
- dow
-
String. Day of the week in pve-day-of-week-list format. Optional.
- dumpdir
-
String. Store resulting files to specified directory. Optional.
- exclude
-
String. Exclude specified VMs (assumes --all) in pve-vmid-list. Optional.
- exclude-path
-
String. Exclude certain files/directories (regex) in string-alist. Optional.
- ionice
-
Integer. Set CFQ ionice priority. Optional.
- lockwait
-
Integer. Maximal time to wait for the global lock (minutes). Optional.
- mailto
-
String. List of email addresses in string-list format. Optional.
- maxfiles
-
Integer. Maximal number of backup files per vm. Optional.
- mode
-
Enum. A value from snapshot, suspend or stop. Backup mode. Optional.
- node
-
String. Only run if executed on this node in pve-node format. Optional.
- quiet
-
Boolean. Be quiet. Optional.
- remove
-
Boolean. Remove old backup files if there are more than 'maxfiles' backup files. Optional.
- script
-
String. Use specified hook script. Optional.
- size
-
Integer. LVM snapshot size in MB. Optional.
- stdexcludes
-
Boolean. Exclude temporary files and logs. Optional.
- stopwait
-
Integer. Maximal time to wait until a VM is stopped (minutes). Optional.
- storage
-
String. Store resulting file to this storage, in pve-storage-id format. Optional.
- tmpdir
-
String. Store temporary files to specified directory. Optional.
- vmid
-
String. The ID of the VM you want to backup in pve-vm-list format. Optional.
Note: required permissions are ["perm","/",["Sys.Modify"]]
delete_cluster_backup
Delete vzdump backup job definition.
$job = $obj->delete_cluster_backup('id')
id is the job ID
Note: required permissions are ["perm","/",["Sys.Modify"]]
cluster_ha
List ha index
@list = $obj->cluster_ha()
Note: Required permissions are ["perm","/",["Sys.Audit"]]
get_cluster_ha_config
List ha config
@list = $obj->get_cluster_ha_config()
Note: Required permissions are ["perm","/",["Sys.Audit"]]
get_cluster_ha_changes
List ha changes
@list = $obj->get_cluster_ha_changes()
Note: Required permissions are ["perm","/",["Sys.Audit"]]
commit_cluster_ha_changes
Commit ha changes
@list = $obj->commit_cluster_ha_changes()
Note: Required permissions are ["perm","/",["Sys.Modify"]]
revert_cluster_ha_changes
Revert ha changes
@list = $obj->revert_cluster_ha_changes()
Note: Required permissions are ["perm","/",["Sys.Modify"]]
cluster_ha_groups
List resource groups
@list = $obj->cluster_ha_groups()
Note: Required permissions are ["perm","/",["Sys.Audit"]]
create_cluster_ha_groups
Create a new resource groups.
$ok = $obj->create_cluster_ha_groups(\%args)
%args may items contain from the following list
- vmid
-
Integer. The unique id of the vm in pve-vmid format. Required.
- autostart
-
Boolean. As per the API spec - "Service is started when quorum forms". Optional.
Note: required permissions are ["perm","/",["Sys.Modify"]]
get_cluster_ha_groups
List resource groups
$job = $obj->get_cluster_ha_groups('id')
id is the resource group id (for example pvevm:200)
Note: required permissions are ["perm","/",["Sys.Audit"]]
update_cluster_ha_groups
Update resource groups settings
$ok = $obj->update_cluster_ha_groups('id', \%args)
id is the group ID for example pvevm:200
%args may items contain from the following list
- autostart
-
Boolean. As per the API spec - "Service is started when quorum forms". Optional.
Note: required permissions are ["perm","/",["Sys.Modify"]]
delete_cluster_ha_group
Delete resource group
$ok = $obj->delete_cluster_ha_group('id')
id is the group ID for example pvevm:200
Note: required permissions are ["perm","/",["Sys.Modify"]]
get_cluster_log
Read cluster log
$job = $obj->get_cluster_log(\%args)
Note: Accessible by all authenticated users
%args may items contain from the following list
- max
-
Integer. Maximum number of entries. Optional.
get_cluster_options
Get datacenter options (this is what the API says)
@list = $obj->get_cluster_options()
Note: Required permissions are ["perm","/",["Sys.Audit"]]
update_cluster_options
Update datacenter options (this is what the spec says)
$job = $obj->update_cluster_options(\%args)
Note: permissions required are ["perm","/",["Sys.Modify"]]
%args may items contain from the following list
- delete
-
String. A list of settings you want to delete in pve-configid-list format. Optional
- http_proxy
-
String. Specify external http proxy to use when downloading, ie http://user:pass@foo:port/. Optional.
- keyboard
-
Enum. Default keyboard layout for VNC sessions. Selected from pt, ja, es, no, is, fr-ca, fr, pt-br, da, fr-ch, sl, de-ch, en-gb, it, en-us, fr-be, hu, pl, nl, mk, fi, lt, sv, de. Optional
- language
-
Enum. Default GUI language. Either en or de. Optional.
get_cluster_resources
Resources index (cluster wide)
@list = $obj->get_cluster_resources()
Note: Accessible by all authententicated users.
%args may items contain from the following list
- Type
-
Enum. One from vm, storage or node. Optional.
get_cluster_status
Get cluster status informations.
@list = $obj->get_cluster_status()
Note: Required permissions are ["perm","/",["Sys.Audit"]]
get_cluster_tasks
List recent tasks (cluster wide)
@list = $obj->get_cluster_tasks()
Note: Available to all authenticated users
SEE ALSO
AUTHOR
Brendan Beveridge <brendan@nodeintegration.com.au>, Dean Hamstead <dean@fragfest.com.au>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2023 by Dean Hamstad.
This is free software, licensed under:
The MIT (X11) License