CreateVm
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.
type: "io.kestra.plugin.ee.vmware.esxi.CreateVm"
Examples
Create a new virtual machine on an ESXi host
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
hostname *Requiredstring
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).
isoName *Requiredstring
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'.
networkName *Requiredstring
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.
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.
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.
vmName *Requiredstring
The name of the virtual machine.
cpuCount integerstring
The number of CPUs for the VM.
The number of virtual CPUs to assign to the virtual machine.
datastoreName string
The name of the datastore to use for the VM.
The name of the datastore where the virtual machine's files will be stored.
diskSize integerstring
The size of the disk in MB.
The size of the virtual machine's disk in megabytes.
guestOsId string
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).
memorySize integerstring
The size of the memory in MB.
The amount of memory in megabytes to assign to the virtual machine.
port integerstring
443
The port for the connection.
The port to connect to the server. Default is 443.
powerOn booleanstring
The flag to whether power on or not the VM.
The option to let the user power on the VM or not.
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.