I am deploying the VM from ovf template. I want to increase the disk space (capacity) for the newly deployed VM.
Every time i want to login and increase the disk from the Vmware vsphere client GUI. Is there any script using PHP Or API to increase the disk space in the GUI.
Please suggest me if any other languages scripts available like python Or Java also.
Thank you in advance.
PowerShell based PowerCLI can do this. You'd also have to expand the partition inside from the OS and how to do that depends on the VMs OS. PowerCLI can run scripts inside VMs but this has some requirements to work properly.
I had a project where we had to deploy a lot of Windows VMs based on a common template. What we did was write a PowerCLI script which reads a CSV file which contains data which template has to be cloned and which adjustments to the cloned VM have to be done (portgroup, network settings, vcpus, memory, additional disks etc). Since we only had a small number of different disk layouts we prepared some scripts which formatted + mounted the additional disks, stored these scripts in the VM template and used the OS customization specification to call the script after VM deployment.
More details related to PowerCLI enclosed