pve_vm_migrate
Migrate a VM or container to another Proxmox node, with live migration for running QEMU VMs and restart migration for LXC containers.
Instructions
Migrate a VM or container to another node.
Applies to: QEMU VMs and LXC containers, located by ``vmid`` (source
``node`` optional and auto-resolved). For a running QEMU VM pass
``online=true`` for live migration. LXC containers cannot live-migrate:
for them ``online=true`` is mapped to PVE restart migration (the CT is
stopped, migrated, and started on ``target_node``).
Side effects: moves the guest (brief downtime for CT restart migration).
Waits up to PVE_MCP_TASK_WAIT seconds for the PVE task; returns JSON with
``vmid``/``node`` (source)/``target_node``/``type`` and ``task``
(``exitstatus`` "OK", failure + ``log_tail``, or ``status`` "running"
with the ``upid`` to follow up via pve_task_status — migrations often
outlast the wait window).
Source: POST /nodes/{node}/{qemu|lxc}/{vmid}/migrate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | No | ||
| vmid | Yes | ||
| online | No | ||
| target_node | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |