Clone a virtual machine from vCenter.

This task clones a VM managed by vCenter and can optionally convert it to a template. ⚠️ This operation is not supported on standalone ESXi hosts.

yaml
type: "io.kestra.plugin.ee.vmware.vcenter.CloneVm"

Clone a VM from vCenter

yaml
id: clone_vm
namespace: company.team

tasks:
  - id: cloneVm
    type: io.kestra.plugin.ee.vmware.vcenter.CloneVm
    server: "vcenter.mycompany.com"
    username: "{{ secret('VMWARE_VCENTER_USERNAME') }}"
    password: "{{ secret('VMWARE_VCENTER_PASSWORD') }}"
    sourceVmName: "base-vm"
    targetVmName: "cloned-vm"
    hostname: "esxi01.mycompany.com"
    datastoreName: "datastore1"
    powerOn: true

Clone a VM and convert it to a template

yaml
id: clone_vm_to_template
namespace: company.team

tasks:
  - id: cloneVmToTemplate
    type: io.kestra.plugin.ee.vmware.vcenter.CloneVm
    server: "vcenter.mycompany.com"
    username: "{{ secret('VMWARE_VCENTER_USERNAME') }}"
    password: "{{ secret('VMWARE_VCENTER_PASSWORD') }}"
    sourceVmName: "base-vm"
    targetVmName: "template-vm"
    hostname: "esxi01.mycompany.com"
    datastoreName: "datastore1"
    convertToTemplate: true
Properties

The name of the datastore in which to place the cloned VM.

The name of the host on which to place the cloned VM.

The password for authentication.

The password used to authenticate with the VMware server.

The URL of the server.

The URL to connect to the VMwareserver. This is a FQDN or an IP address (eg: esxi.mycompany.com), so without any protocol nor port.

The name of the source virtual machine to be cloned.

The name for the newly cloned virtual machine.

The username for authentication.

The username used to authenticate with the server. It could be something like '[email protected]' for vCenter or 'root' for ESXi.

Default false

Whether to convert the cloned VM into a template.

Default 443

The port for the connection.

The port to connect to the server. Default is 443.

Default false

Whether to power on the VM after cloning.

The path to the trust store file.

The path to the trust store file containing certificates for secure connections. If not provided, an empty keystore will be created and the connection will be insecure.