Skip to content
proxmox_migrate

proxmox_migrate

!proxmox_migrate

Category: proxmox

Live (online) or offline migration of a Proxmox VM or LXC guest from a source node to a target node. Blocks until the migration task completes or times out.

Parameters

NameTypeRequiredDescription
api_hoststringyesProxmox API host.
api_token_idstringyesProxmox API token ID.
api_token_secretstringyesProxmox API token secret.
source_nodestringyesNode the guest currently resides on.
target_nodestringyesNode to migrate the guest to.
vmidintyesGuest VMID.
guest_typestringyesvm/qemu or lxc/container.
onlineboolnoFor VMs: live migration. Default true.
restartboolnoFor LXCs: restart guest after migration. Default true.
timeoutintnoSeconds to wait for migration to finish. Default 300.

Examples

- !proxmox_migrate
  api_host: '{{ proxmox_host }}'
  api_token_id: '{{ proxmox_token_id }}'
  api_token_secret: '{{ proxmox_token_secret }}'
  source_node: bee
  target_node: moth
  vmid: 100
  guest_type: lxc
  online: true