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.
type: "io.kestra.plugin.ee.vmware.vcenter.CloneVm"
Examples
Clone a VM from vCenter
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
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
datastoreName *Requiredstring
The name of the datastore in which to place the cloned VM.
hostname *Requiredstring
The name of the host on which to place the cloned VM.
password *Requiredstring
The password for authentication.
The password used to authenticate with the VMware server.
server *Requiredstring
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.
sourceVmName *Requiredstring
The name of the source virtual machine to be cloned.
targetVmName *Requiredstring
The name for the newly cloned virtual machine.
username *Requiredstring
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.
convertToTemplate booleanstring
false
Whether to convert the cloned VM into a template.
port integerstring
443
The port for the connection.
The port to connect to the server. Default is 443.
powerOn booleanstring
false
Whether to power on the VM after cloning.
trustStorePath string
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.