Creates a new virtual machine on an ESXi host and powers it on.

This task allows you to create a new virtual machine directly on an ESXi host. It requires the necessary credentials and configuration to connect to the ESXi server.

yaml
type: "io.kestra.plugin.ee.vmware.esxi.CreateVm"

Create a new virtual machine on an ESXi host

yaml
id: esxi_create_vm
namespace: company.team

tasks:
  - id: create_vm
    type: io.kestra.plugin.ee.vmware.esxi.CreateVm
    server: "esxi.mycompany.com"
    username: "{{ secret('VMWARE_ESXI_USERNAME') }}"
    password: "{{ secret('VMWARE_ESXI_PASSWORD') }}"
    hostname: "esxi.mycompany.com"
    vmName: "esxi-vm"
    networkName: "VM Network"
    datastoreName: "datastore1"
    isoName: "ubuntu-22.04.5-desktop-amd64.iso"
Properties

The name of the host system.

The name of the host system where the virtual machine will be created. For ESXi, this should be the same as the 'server' property (FQDN or IP).

The path to the ISO file in the datastore.

The path to an ISO file to mount as a CD/DVD drive. The path is relative to the datastore root (e.g., 'ISOs/ubuntu.iso'). The ISO must be located on the specified 'datastoreName'.

The name of the network to connect the VM to.

The name of the network that the virtual machine will be connected to. For ESXi, this is typically a Standard Switch Port Group.

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 username for authentication.

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

The name of the virtual machine.

The number of CPUs for the VM.

The number of virtual CPUs to assign to the virtual machine.

The name of the datastore to use for the VM.

The name of the datastore where the virtual machine's files will be stored.

The size of the disk in MB.

The size of the virtual machine's disk in megabytes.

The guest OS ID for the VM.

The identifier for the guest operating system that will run on the virtual machine (eg: ubuntu64Guest, rhel9_64Guest, windows11_64Guest, etc).

The size of the memory in MB.

The amount of memory in megabytes to assign to the virtual machine.

Default 443

The port for the connection.

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

The flag to whether power on or not the VM.

The option to let the user power on the VM or not.

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.