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
| Name | Type | Required | Description |
|---|---|---|---|
api_host | string | yes | Proxmox API host. |
api_token_id | string | yes | Proxmox API token ID. |
api_token_secret | string | yes | Proxmox API token secret. |
source_node | string | yes | Node the guest currently resides on. |
target_node | string | yes | Node to migrate the guest to. |
vmid | int | yes | Guest VMID. |
guest_type | string | yes | vm/qemu or lxc/container. |
online | bool | no | For VMs: live migration. Default true. |
restart | bool | no | For LXCs: restart guest after migration. Default true. |
timeout | int | no | Seconds 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