Guest network customization via API/script ?

I've been poking around the various myriad APIs and SDKs for about a week, and I can't find the answer to a simple issue:

When I clone a template/VM via the GUI or Web client, it gives me the option to Customize it (change the hostname/network info, etc.)

Now, that doesn't work for automated systems, where I need to be able to write a script which does that customization.

I've got a template all set up (both a CentOS Linux and Windows 2008 ones) with generic network info, and the VMWare Tools already installed.  I need to know where to look to figure out how to change the hostname and network information for both OSes either after or during a clone.

The  Perk SDK sample script allows me to do some things, but not the critical network info update.

Any pointers to sample scripts (preferably Perl) would be greatly appreciated.

To be specific, I need the ability to change the hostname, IP address, netmask, default gateway, DNS servers, and DNS domain in the GUEST VM, from either an API call or SDK, preferably without having to be logged into the specific ESXi host where the guest VM is.  And a solution for both Linux and Windows.


0 Kudos
0 Replies