atishbits
Contributor
Contributor

Here's some sample code leveraging vSphere Management SDK for Java to assign static IP to a VM as part of cloning an existing template to create the new VM.

https://blog.profiq.cz/2015/02/24/using-java-to-create-customized-virtual-machine-clones-on-vmware-i...

The code samples from above link are not from me. Besides, ensure that VMware tools are installed in your template (i.e. in the VM you use for template creation). Since assigning an IP to a VM is an operation on the guest OS, you need VMware tools to be able to pass the values to the guest OS.

Reply
0 Kudos