pve_vm_clone
Clone a VM or container to a new, unused VM ID. Create a full independent copy or a linked clone from a template, with optional target storage and node placement.
Instructions
Clone a VM or container to a new vmid.
Applies to: QEMU VMs and LXC containers, located by ``vmid`` (``node``
optional and auto-resolved). ``newid`` must be unused. ``full=true``
makes an independent full copy (required when the source is not a
template); linked clones (``full=false``) need a template source.
``storage`` sets the target storage for a full clone; ``target_node``
places the clone on another node (shared storage required).
Side effects: creates a new guest (stopped). Clones often outlast the
PVE_MCP_TASK_WAIT window — then ``task.status`` is "running" and the
``upid`` can be followed with pve_task_status. Returns JSON with
``vmid`` (source), ``newid``, ``node``/``type`` and ``task``.
Source: POST /nodes/{node}/{qemu|lxc}/{vmid}/clone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | ||
| name | No | ||
| node | No | ||
| vmid | Yes | ||
| newid | Yes | ||
| storage | No | ||
| target_node | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |