proxmox

Proxmox Cloud Module

The Proxmox cloud module is used to control access to Proxmox.

This cloud module is a wrapper for the Proxmox API. As such, all supported parameters for VM operations (create, clone, start, …) by the Proxmox API are also supported through this cloud module.

maintainer:

EITR Technologies, LLC <devops@eitr.tech>

depends:

requests >= 2.2.1

saltext.proxmox.clouds.proxmox.__virtual__()[source]

Check for Proxmox configurations

saltext.proxmox.clouds.proxmox.get_configured_provider()[source]

Return the first configured instance.

saltext.proxmox.clouds.proxmox.get_dependencies()[source]

Warn if dependencies aren’t met.

saltext.proxmox.clouds.proxmox.create(vm_)[source]

Create a single Proxmox VM.

saltext.proxmox.clouds.proxmox.clone(kwargs=None, call=None)[source]

Clone a VM

kwargs

Parameters to be passed as dict.

For required and optional parameters please check the Proxmox API documentation:
  • https://<PROXMOX_URL>/pve-docs/api-viewer/index.html#/nodes/{node}/lxc/{vmid}/clone

  • https://<PROXMOX_URL>/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/clone

CLI Example:

salt-cloud -f clone my-proxmox-config vmid=123 newid=456
saltext.proxmox.clouds.proxmox.reconfigure(name=None, kwargs=None, call=None)[source]

Reconfigure a Proxmox VM

name

The name of VM to be be reconfigured.

kwargs

Addtional parameters to be passed as dict.

For additional parameters please check the Proxmox API documentation:
  • https://<PROXMOX_URL>/pve-docs/api-viewer/index.html#/nodes/{node}/lxc/{vmid}/config

  • https://<PROXMOX_URL>/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/config

CLI Example:

salt-cloud -a reconfigure vm_name
saltext.proxmox.clouds.proxmox.destroy(name=None, kwargs=None, call=None)[source]

Destroy a Proxmox VM by name

name

The name of VM to be be destroyed.

CLI Example:

salt-cloud -d vm_name
saltext.proxmox.clouds.proxmox.avail_locations(call=None)[source]

Return available Proxmox datacenter locations

CLI Example:

salt-cloud --list-locations my-proxmox-config
saltext.proxmox.clouds.proxmox.avail_images(kwargs=None, call=None)[source]

Return available Proxmox images

storage

Name of the storage location that should be searched.

kwargs

Addtional parameters to be passed as dict.

CLI Example:

salt-cloud --list-images my-proxmox-config
salt-cloud -f avail_images my-proxmox-config storage="storage1"
saltext.proxmox.clouds.proxmox.list_nodes(call=None)[source]

Return a list of the VMs that are managed by the provider

CLI Example:

salt-cloud -Q
salt-cloud -f list_nodes my-proxmox-config
saltext.proxmox.clouds.proxmox.list_nodes_full(call=None)[source]

Return a list of the VMs that are managed by the provider, with full configuration details

CLI Example:

salt-cloud -F
salt-cloud -f list_nodes_full my-proxmox-config
saltext.proxmox.clouds.proxmox.list_nodes_select(call=None)[source]

Return a list of the VMs that are managed by the provder, with select fields

saltext.proxmox.clouds.proxmox.show_instance(name=None, call=None)[source]

Show the details from Proxmox concerning an instance

name

The name of the VM for which to display details.

CLI Example:

salt-cloud -a show_instance vm_name
saltext.proxmox.clouds.proxmox.start(name=None, kwargs=None, call=None)[source]

Start a node.

name

The name of the VM. Required.

kwargs

Addtional parameters to be passed as dict.

For additional parameters please check the Proxmox API documentation:
  • https://<PROXMOX_URL>/pve-docs/api-viewer/index.html#/nodes/{node}/lxc/{vmid}/status/start

  • https://<PROXMOX_URL>/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/status/start

CLI Example:

salt-cloud -a start vm_name
saltext.proxmox.clouds.proxmox.stop(name=None, kwargs=None, call=None)[source]

Stop a node.

For additional parameters please check the Proxmox API documentation:
  • https://<PROXMOX_URL>/pve-docs/api-viewer/index.html#/nodes/{node}/lxc/{vmid}/status/stop

  • https://<PROXMOX_URL>/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/status/stop

name

The name of the VM. Required.

kwargs

Addtional parameters to be passed as dict.

CLI Example:

salt-cloud -a stop vm_name
saltext.proxmox.clouds.proxmox.shutdown(name=None, kwargs=None, call=None)[source]

Shutdown a node.

name

The name of the VM. Required.

kwargs

Addtional parameters to be passed as dict.

For additional parameters please check the Proxmox API documentation:
  • https://<PROXMOX_URL>/pve-docs/api-viewer/index.html#/nodes/{node}/lxc/{vmid}/status/shutdown

  • https://<PROXMOX_URL>/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/status/shutdown

CLI Example:

salt-cloud -a shutdown vm_name