Here is a script that uses a RHEL5.4 as a template and then make new machines based on input from a CSV file. Our script then update the network settings , stopps TSM (we have that) and update the RHN with the newly created machine.
CSV input file. basevm, vcname, vmname etc are cells on line 1 in Excel. Input values are on cells on line 2 in Excel i.e. basevm = TMP_RH5.4_64. vcname is a friendly name in vCenter5. Should however be the DNS name but at my current client they use uppercase letters of the hostname with Environment attached to name i.e. DNSM1-DEV1 but the dns name (linux hostname) is dnsm1.
basevm,vcname,vmname,custspec,ipaddress,subnet,gateway,pdns,sdns,vlan,location,vcpu,vmemory
TMP_RH5.4_64,MyVMinvCenter,linuxhostname,custspec,10.10.10.10,255.255.255.0,10.10.10.254,
10.10.10.100,10.10.10.101,VLAN_415,Folder,2,8192
Read more »