Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

2 Answers

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
share|improve this answer
    
Yes, but I basically want to do all this via the vsphere sdk. Does anyone have experience with that ? –  user56760 Oct 12 '10 at 4:47
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.