Net::Proxmox::VE::Cluster - Functions for the 'cluster' portion of the API
version 0.32
# assuming $obj is a Net::Proxmox::VE object
Returns the 'Cluster index':
@list = $obj->cluster()
Note: Accessible by all authententicated users.
List vzdump backup schedule.
@list = $obj->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
String. Job start time, format is HH::MM. Required.
Boolean. Backup all known VMs on this host. Required.
Integer. Limit I/O bandwidth (KBytes per second). Optional.
Enum. Either 0, 1, gzip or lzo. Comress dump file. Optional
String. Day of the week in pve-day-of-week-list format. Optional.
String. Store resulting files to specified directory. Optional.
String. Exclude specified VMs (assumes --all) in pve-vmid-list. Optional.
String. Exclude certain files/directories (regex) in string-alist. Optional.
Integer. Set CFQ ionice priority. Optional.
Integer. Maximal time to wait for the global lock (minutes). Optional.
String. List of email addresses in string-list format. Optional.
Integer. Maximal number of backup files per vm. Optional.
Enum. A value from snapshot, suspend or stop. Backup mode. Optional.
String. Only run if executed on this node in pve-node format. Optional.
Boolean. Be quiet. Optional.
Boolean. Remove old backup files if there are more than 'maxfiles' backup files. Optional.
String. Use specified hook script. Optional.
Integer. LVM snapshot size in MB. Optional.
Boolean. Exclude temporary files and logs. Optional.
Integer. Maximal time to wait until a VM is stopped (minutes). Optional.
String. Store resulting file to this storage, in pve-storage-id format. Optional.
String. Store temporary files to specified directory. Optional.
String. The ID of the VM you want to backup in pve-vm-list format. Optional.
Note: required permissions are ["perm","/",["Sys.Modify"]]
Read vzdump backup job definition.
$job = $obj->get_cluster_backup('id')
id is the job ID
Note: required permissions are ["perm","/",["Sys.Audit"]]
Update vzdump backup job definition.
$ok = $obj->update_cluster_backup(\%args)
Delete vzdump backup job definition.
$job = $obj->delete_cluster_backup('id')
List ha index
@list = $obj->cluster_ha()
Note: Required permissions are ["perm","/",["Sys.Audit"]]
List ha config
@list = $obj->get_cluster_ha_config()
List ha changes
@list = $obj->get_cluster_ha_changes()
Commit ha changes
@list = $obj->commit_cluster_ha_changes()
Note: Required permissions are ["perm","/",["Sys.Modify"]]
Revert ha changes
@list = $obj->revert_cluster_ha_changes()
List resource groups
@list = $obj->cluster_ha_groups()
Create a new resource groups.
$ok = $obj->create_cluster_ha_groups(\%args)
Integer. The unique id of the vm in pve-vmid format. Required.
Boolean. As per the API spec - "Service is started when quorum forms". Optional.
$job = $obj->get_cluster_ha_groups('id')
id is the resource group id (for example pvevm:200)
Update resource groups settings
$ok = $obj->update_cluster_ha_groups('id', \%args)
id is the group ID for example pvevm:200
Delete resource group
$ok = $obj->delete_cluster_ha_group('id')
Read cluster log
$job = $obj->get_cluster_log(\%args)
Note: Accessible by all authenticated users
Integer. Maximum number of entries. Optional.
Get datacenter options (this is what the API says)
@list = $obj->get_cluster_options()
Update datacenter options (this is what the spec says)
$job = $obj->update_cluster_options(\%args)
Note: permissions required are ["perm","/",["Sys.Modify"]]
String. A list of settings you want to delete in pve-configid-list format. Optional
String. Specify external http proxy to use when downloading, ie http://user:pass@foo:port/. Optional.
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
Enum. Default GUI language. Either en or de. Optional.
Resources index (cluster wide)
@list = $obj->get_cluster_resources()
Enum. One from vm, storage or node. Optional.
Get cluster status informations.
@list = $obj->get_cluster_status()
List recent tasks (cluster wide)
@list = $obj->get_cluster_tasks()
Note: Available to all authenticated users
L<Net::Proxmox::VE>
Brendan Beveridge <brendan@nodeintegration.com.au>, Dean Hamstead <dean@bytefoundry.com.au>
This software is copyright (c) 2016 by Dean Hamstad.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Net::Proxmox::VE, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Proxmox::VE
CPAN shell
perl -MCPAN -e shell install Net::Proxmox::VE
For more information on module installation, please visit the detailed CPAN module installation guide.