vsphere_clone_vm
Clone a virtual machine or deploy from a template in VMware vSphere, with options for target host, datastore, resource pool, folder, and power state. Can return a task ID for async tracking.
Instructions
Clone a virtual machine or deploy one from a template.
Placement defaults to the source VM's host, datastore, resource pool and
folder; override any of them individually. Cloning copies every disk, so
it can take a long time for large VMs -- pass wait=false to get a
task id back immediately and poll it with vsphere_get_task.
Requires permission mode write or higher.
Args: vm: Source VM or template (name, moid, UUID or inventory path). name: Name for the new virtual machine. host: Target ESXi host. datastore: Target datastore for the clone's files. resource_pool: Target resource pool. folder: Target VM folder. power_on: Power the clone on once the clone completes. as_template: Register the clone as a template instead of a VM. wait: Wait for the clone task to finish. timeout_seconds: Override the default task timeout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vm | Yes | ||
| host | No | ||
| name | Yes | ||
| wait | No | ||
| folder | No | ||
| power_on | No | ||
| datastore | No | ||
| as_template | No | ||
| resource_pool | No | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||