This utility is a simple to use comand line tool to create VMs on an ESXi host from from a system running python and ssh. vCenter is not required. This tool is an easy way to automate building VM's from command line or from other testing or automation tools such as Bamboo, Puppet, Saltstack, or Chef.
Usage
-----
The only command line required paramater is the VM name (-n), all other command line arguments are optional.
Defaults are stored in your home directory in ~/.esxi-vm.yml. You can edit this file directly, or you can use the tool to update the defaults by specifying --updateDefaults.
Some basic sanity checks are done on the ESXi host before creating the VM. The Verbose (-v) option will give you a little more details in the creation process. If an invalid Disk Stores or Network Interface is specified, the available devices will be shown in the error message. The tool will not show the list of available ISO images, and Guest OS types. CPU, Memory, Virtual Disk sizes are based on ESXi 6.0 limitations.
By default the ISO is set to "None". Specify the full path to the ISO image. If you specify just the ISO image (no path), the system will attempt to find the ISO image on the DataStores.
By default the Network set set to "None". A full or partial MAC address can be specified. A partial MAC address argument would be 3 Hex pairs which would then be prepended by VMware's OEM "00:50:56".
By default the VM is powered on. If an ISO was specified, then it will boot the ISO image. Otherwise, the VM will attempt a PXE boot if a Network Interface was specified. You could customize the ISO image to specify the kickstart file, or PXE boot using COBBLER, Foreman, Razor, or your favorite provisioning tool.
It's HIGHLY RECOMMENDED to use password-less authentication by copying your ssh public keys to the ESXi host, otherwise your ESXi root password could be stored in clear-text in your home directory.