vm_clone
Clone a VM to a new name on the same or different host and datastore. Creates a full independent copy; optionally powers it on after creation.
Instructions
[WRITE] Clone a VM. Without to_host/to_datastore the clone lands on the source's host+datastore.
Returns a status string naming the clone. Full independent copy — slow and full disk cost; prefer deploy_linked_clone for near-instant test copies and batch_clone_vms for many at once. Cloning a running VM may capture a crash-consistent disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | vCenter/ESXi target name from config. | |
| to_host | No | Target ESXi host name (default: source's host). | |
| vm_name | Yes | Source VM (or template) name. | |
| new_name | Yes | Name for the new clone. | |
| power_on | No | Power on the clone after creation. | |
| to_datastore | No | Target datastore name (default: source's datastore). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |