1

I'm using the vsphere perl sdk for this task.

I'm cloning a new VM (Linux and Windows) from an existing image and all I'm interested in is changing the IP address of the new clones. In case of Windows, Virtual center wants me to enter about a dozen parameters for this task and Linux also requires quite a few params.

My question is can I just change the IP address using the SDK or do I have to enter the rest of the values also ?

2 Answers 2

1

Guest customization for a windows guest does a number of things for you:

  1. Runs Sysprep (generates new SID, computer name, Enters product key/license info, owner)
  2. Updates IP info
  3. Updates admin password
  4. Updates timezone
  5. Updates domain/workgroup

On Linux guest customization there are less options, and those can easily be scripted, as I have done it in the past.

  1. Edit hostnames/IPs (/etc/hosts /etc/hostname)
  2. Edit IP (/etc/sysconfig/network-interfaces/ifcfg-eth0 /etc/networks)
  3. Hmm, I can't think of any more for linux... :D
1
  • Yes, but I basically want to do all this via the vsphere sdk. Does anyone have experience with that ?
    – user56760
    Oct 12, 2010 at 4:47
0

You can create customization spec with the vSphere SDK which can have a Custom IP. API reference

CustomizationSpec -> CustomizationAdapterMapping -> CustomizationIPSettings -> CustomizationIpGenerator -> CustomizationCustomIpGenerator, CustomizationDhcpIpGenerator, CustomizationFixedIp, CustomizationUnknownIpGenerator

You must log in to answer this question.